Introduction

Build Website Website Website Website

Packages & Data

Packages

This document was prepared on 2021-11-11.

library(tidyverse)
library(patchwork)
library(glmmTMB)
library(report)
library(parameters)
library(correlation)
library(modelbased)
library(performance)
library(see)

summary(report::report(sessionInfo()))

The analysis was done using the R Statistical language (v4.1.1; R Core Team, 2021) on Windows 10 x64, using the packages effectsize (v0.4.5.4), ggplot2 (v3.3.5), stringr (v1.4.0), forcats (v0.5.1), tidyr (v1.1.4), readr (v2.0.2), dplyr (v1.0.7), tibble (v3.1.4), purrr (v0.3.4), parameters (v0.15.0.1), insight (v0.14.5.1), performance (v0.7.3.5), see (v0.7.0.1), easystats (v0.4.3), correlation (v0.7.1.1), modelbased (v0.7.0.1), bayestestR (v0.11.5), report (v0.4.0), datawizard (v0.2.1.9000), glmmTMB (v1.1.2.3), patchwork (v1.1.1) and tidyverse (v1.3.1).

Data

# setwd("C:/Users/user/Desktop/Sputnik/2019-23/DeceptionInteroTom")

df <- read.csv("data/data_combined.csv") %>% 
  mutate(ID = as.factor(paste0("S", ID)),
         condition = as.factor(condition),
         item = as.factor(item),
         style = as.factor(style),
         instruction = as.factor(instruction)) |> 
  #TODO: This renaming should be done at the preprocessing stage
  rename("Participant" = "ID",
         "Condition" = "condition",
         "Item" = "item",
         "Phrasing" = "style",
         "Answer" = "instruction",
         "YONI_Total" = "yoni_total",
         "YONI_Affective" = "yoni_affective",
         "YONI_Cognitive" = "yoni_cognitive",
         "YONI_Physical" = "yoni_physical",
         "BES_Total" = "BES_total",
         "BES_Cognitive" = "BES_cognitive",
         "BES_Affective" = "BES_affective",
         "HCT_Confidence" = "HCT_confidence",
         "HCT_Accuracy" = "HCT_accuracy",
         "HCT_Awareness" = "HCT_awareness",
         "MAIA_Total" = "MAIA_total",
         "MAIA_AttentionRegulation" = "MAIA_attention_regulation",
         "MAIA_BodyListening" = "MAIA_body_listening",
         "MAIA_EmotionalAwareness" = "MAIA_emotional_awareness",
         "MAIA_NotDistracting" = "MAIA_not_distracting",
         "MAIA_NotWorrying" = "MAIA_not_worrying",
         "MAIA_Noticing" = "MAIA_noticing",
         "MAIA_SelfRegulation" = "MAIA_self_regulation",
         "MAIA_Trusting" = "MAIA_trusting",
         "LIE_Ability" = "lie_ability",
         "LIE_Frequency" = "lie_frequency",
         "LIE_Negativity" = "lie_negativity",
         "LIE_Contextuality" = "lie_contextuality",
         "Confidence" = "DT_confidence",
         "RT" = "DT_RT") |> 
  mutate(Answer = fct_recode(Answer, Lie = "LIE", Truth = "TRUTH")) |> 
  select(-HCT_guess, -HCT_noguess, -HCT_onebreath)

cat(paste("The data consists of",
          report::report_participants(df,
                                      participants = "Participant",
                                      sex = "Gender",
                                      age = "Age")))

The data consists of 30 participants (Mean age = 21.1, SD = 2.1, range: [18, 25]; 63.3% females)

Measures

Theory of Mind / Empathy

Yoni Task

df %>% 
  group_by(Participant) %>% 
  select(starts_with("YONI_")) |> 
  summarise_all(mean, na.rm=TRUE) |> 
  tidyr::pivot_longer(-Participant, values_to = "Scores") |> 
  mutate(name = paste0(str_replace(name, "_", " ("), ")")) |> 
  ggplot(aes(x = Scores, fill = name)) +
  geom_density() +
  scale_fill_manual(values = c("YONI (Affective)" = "Purple",
                                 "YONI (Cognitive)" = "Blue",
                                 "YONI (Physical)" = "Green",
                                 "YONI (Total)"= "DarkBlue"),
                      guide = "none") +
  facet_wrap(~name, scales = "free")

BES Questionnaire

df %>% 
  group_by(Participant) %>% 
  select(starts_with("BES_")) |> 
  summarise_all(mean, na.rm=TRUE) |> 
  tidyr::pivot_longer(-Participant, values_to = "Scores") |> 
  mutate(name = paste0(str_replace(name, "_", " ("), ")")) |> 
  ggplot(aes(x = Scores, fill = name)) +
  geom_density() +
  scale_fill_manual(values = c("BES (Affective)" = "Purple",
                               "BES (Cognitive)" = "Blue",
                               "BES (Total)"= "DarkBlue"),
                      guide = "none") +
  facet_wrap(~name, scales = "free")

Interoception

Heartbeat Counting Task (HCT)

df %>% 
  group_by(Participant) %>% 
  select(starts_with("HCT_")) |> 
  summarise_all(mean, na.rm=TRUE) |> 
  tidyr::pivot_longer(-Participant, values_to = "Scores") |> 
  mutate(name = paste0(str_replace(name, "_", " ("), ")")) |> 
  ggplot(aes(x = Scores, fill = name)) +
  geom_density() +
  scale_fill_manual(values = c("HCT (Accuracy)" = "Red",
                               "HCT (Awareness)" = "Orange",
                               "HCT (Confidence)"= "DarkOrange"),
                      guide = "none") +
  facet_wrap(~name, scales = "free")
> Warning: Removed 6 rows containing non-finite values (stat_density).

MAIA

df %>% 
  group_by(Participant) %>% 
  select(starts_with("MAIA_")) |> 
  summarise_all(mean, na.rm=TRUE) |> 
  tidyr::pivot_longer(-Participant, values_to = "Scores") |> 
  mutate(name = paste0(str_replace(name, "_", " ("), ")")) |> 
  ggplot(aes(x = Scores, fill = name)) +
  geom_density() +
  scale_fill_brewer(palette = "Reds", guide = "none") +
  facet_wrap(~name, scales = "free")

Deception

LIE Scale

df %>% 
  group_by(Participant) %>% 
  select(starts_with("LIE_")) |> 
  summarise_all(mean, na.rm=TRUE) |> 
  tidyr::pivot_longer(-Participant, values_to = "Scores") |> 
  mutate(name = paste0(str_replace(name, "_", " ("), ")")) |> 
  ggplot(aes(x = Scores, fill = name)) +
  geom_density() +
  scale_fill_manual(values = c("LIE (Ability)" = "#2196F3",
                               "LIE (Frequency)" = "#4CAF50",
                               "LIE (Contextuality)"= "#FF9800",
                               "LIE (Negativity)"= "#E91E63"),
                    guide = "none") +
  facet_wrap(~name, scales = "free")

Deception Task

Summary Table

df |> 
  group_by(Participant, Answer) |> 
  summarise(Confidence = paste(insight::format_value(mean(Confidence, na.rm = TRUE)),
                               " +- ",
                               insight::format_value(sd(Confidence, na.rm = TRUE))),
            RT = paste(insight::format_value(mean(RT, na.rm = TRUE)),
                       " +- ",
                       insight::format_value(sd(RT, na.rm = TRUE)))) |> 
  arrange(Participant) |> 
  knitr::kable()
Participant Answer Confidence RT
S1 Lie 0.40 +- 0.10 3.69 +- 0.69
S1 Truth 0.52 +- 0.15 3.75 +- 0.79
S10 Lie 0.59 +- 0.28 3.20 +- 0.71
S10 Truth 0.84 +- 0.13 3.22 +- 0.62
S11 Lie 0.38 +- 0.31 3.60 +- 0.69
S11 Truth 0.72 +- 0.26 3.48 +- 0.62
S12 Lie 0.58 +- 0.13 3.77 +- 1.42
S12 Truth 0.64 +- 0.16 4.40 +- 1.72
S13 Lie 0.28 +- 0.25 7.22 +- 0.82
S13 Truth 0.85 +- 0.17 7.57 +- 0.81
S14 Lie 0.52 +- 0.29 4.13 +- 0.86
S14 Truth 0.62 +- 0.26 5.29 +- 1.54
S15 Lie +- 4.38 +- 0.94
S15 Truth +- 4.15 +- 1.04
S16 Lie 0.41 +- 0.18 4.94 +- 1.13
S16 Truth 0.66 +- 0.11 5.07 +- 1.01
S17 Lie 0.63 +- 0.31 2.72 +- 0.63
S17 Truth 0.77 +- 0.19 2.72 +- 0.51
S18 Lie 0.21 +- 0.33 5.88 +- 2.54
S18 Truth 0.79 +- 0.36 5.13 +- 1.98
S19 Lie +- 3.44 +- 1.55
S19 Truth +- 3.71 +- 2.05
S2 Lie 0.10 +- 0.17 6.46 +- 1.95
S2 Truth 0.94 +- 0.08 6.83 +- 1.71
S20 Lie 0.37 +- 0.32 3.79 +- 0.74
S20 Truth 0.80 +- 0.17 4.04 +- 1.02
S21 Lie 0.55 +- 0.12 4.97 +- 1.01
S21 Truth 0.74 +- 0.18 5.09 +- 1.04
S22 Lie 0.13 +- 0.29 4.78 +- 2.94
S22 Truth 0.81 +- 0.36 5.12 +- 2.99
S23 Lie +- 3.10 +- 1.18
S23 Truth +- 2.99 +- 0.80
S24 Lie 0.27 +- 0.22 2.81 +- 0.68
S24 Truth 0.72 +- 0.17 2.69 +- 0.64
S25 Lie 0.63 +- 0.33 3.71 +- 1.11
S25 Truth 0.85 +- 0.22 3.71 +- 0.92
S26 Lie 0.46 +- 0.21 3.32 +- 0.61
S26 Truth 0.70 +- 0.16 3.23 +- 0.53
S27 Lie 0.32 +- 0.09 5.19 +- 1.88
S27 Truth 0.68 +- 0.07 4.75 +- 1.78
S28 Lie 0.49 +- 0.36 3.78 +- 0.83
S28 Truth 0.59 +- 0.32 3.69 +- 0.50
S29 Lie 0.58 +- 0.50 3.22 +- 0.56
S29 Truth 0.90 +- 0.30 3.31 +- 0.68
S3 Lie +- 3.35 +- 0.80
S3 Truth +- 3.42 +- 0.96
S30 Lie 0.80 +- 0.28 4.09 +- 1.10
S30 Truth 0.88 +- 0.18 3.80 +- 0.99
S4 Lie 0.67 +- 0.18 3.86 +- 0.89
S4 Truth 0.77 +- 0.13 3.81 +- 0.80
S5 Lie 0.53 +- 0.23 3.41 +- 0.63
S5 Truth 0.72 +- 0.21 3.45 +- 0.69
S6 Lie 0.11 +- 0.15 3.10 +- 0.52
S6 Truth 0.90 +- 0.09 3.24 +- 0.64
S7 Lie 0.62 +- 0.33 3.84 +- 0.58
S7 Truth 0.69 +- 0.29 3.69 +- 0.55
S8 Lie 0.44 +- 0.17 4.48 +- 0.95
S8 Truth 0.71 +- 0.16 4.59 +- 1.12
S9 Lie 5.79e-04 +- 9.06e-04 4.75 +- 1.42
S9 Truth 1.00 +- 1.18e-03 5.15 +- 1.88

Outliers

df <- df |> 
  dplyr::filter(Participant != "S9",  # Extreme answers
                !Participant %in% c("S3", "S15", "S19", "S23"))  # No data

Distributions

p1 <- df |> 
  dplyr::filter(!Participant %in% c("S29")) |>
  ggplot(aes(x = Confidence, fill = Participant)) +
  geom_density(alpha = 0.1) +
  see::scale_fill_material_d(palette = "rainbow", guide = "none") +
  see::theme_modern() +
  scale_x_continuous(labels = scales::percent, expand=expansion(c(0, .05))) +
  scale_y_continuous(expand=expansion(c(0, .05))) +
  facet_wrap(~Answer)
p2 <- df |> 
  dplyr::filter(!Participant %in% c("S29")) |> 
  ggplot(aes(x = RT, fill = Participant)) +
  geom_density(alpha = 0.1) +
  see::scale_fill_material_d(palette = "rainbow", guide = "none") +
  scale_x_continuous(expand=expansion(c(0, .05))) +
  scale_y_continuous(expand=expansion(c(0, .05))) +
  facet_wrap(~Answer)
p1 / p2

Manipulation Checks

Correlation

dfsub <- df |> 
  select(Participant, 
         starts_with("YONI_"), 
         starts_with("BES_"),
         starts_with("HCT_"),
         starts_with("MAIA_"),
         starts_with("LIE_")) |> 
  group_by(Participant) |> 
  summarise_all(mean)

Theory of Mind / Empathy

r <- correlation(select(dfsub, starts_with("YONI_")),
                 select(dfsub, starts_with("BES_")), 
                 p_adjust = "none")

summary(r) |> 
  plot()

Interoception

r <- correlation(select(dfsub, starts_with("MAIA_")),
                 select(dfsub, starts_with("HCT_")), 
                 p_adjust = "none")

summary(r) |> 
  plot()

ToM and Interoception

r <- correlation(select(dfsub, starts_with(c("MAIA_", "HCT_"))),
                 select(dfsub, starts_with(c("YONI_", "BES_"))), 
                 p_adjust = "none")

summary(r) |> 
  plot()

Phrasing

  • Main effect of phrasing on RT only. Indirect questions lead to slower answers.

RT

model <- glmmTMB(RT ~ Answer * Phrasing + (1|Participant) + (1|Item), data = df) 

parameters::parameters(model, effects = "fixed")
> # Fixed Effects
> 
> Parameter                            | Coefficient |   SE |        95% CI |     z |      p
> ------------------------------------------------------------------------------------------
> (Intercept)                          |        4.01 | 0.24 | [ 3.54, 4.47] | 16.80 | < .001
> Answer [Truth]                       |        0.03 | 0.07 | [-0.11, 0.17] |  0.39 | 0.694 
> Phrasing [Indirect]                  |        0.33 | 0.07 | [ 0.19, 0.48] |  4.58 | < .001
> Answer [Truth] * Phrasing [Indirect] |        0.08 | 0.10 | [-0.12, 0.28] |  0.79 | 0.429
estimate_means(model, at = c("Answer", "Phrasing")) |> 
  plot(show_data = "none") 

Confidence

model <- glmmTMB(Confidence ~ Answer * Phrasing + (1|Participant) + (1|Item), data = df) 

parameters::parameters(model)
> # Fixed Effects
> 
> Parameter                            | Coefficient |   SE |        95% CI |     z |      p
> ------------------------------------------------------------------------------------------
> (Intercept)                          |        0.45 | 0.02 | [ 0.41, 0.49] | 20.53 | < .001
> Answer [Truth]                       |        0.31 | 0.02 | [ 0.28, 0.34] | 18.53 | < .001
> Phrasing [Indirect]                  |       -0.02 | 0.02 | [-0.05, 0.02] | -0.93 | 0.353 
> Answer [Truth] * Phrasing [Indirect] |    2.98e-03 | 0.02 | [-0.04, 0.05] |  0.13 | 0.899 
> 
> # Random Effects
> 
> Parameter                   | Coefficient |       95% CI
> --------------------------------------------------------
> SD (Intercept: Participant) |        0.09 | [0.07, 0.13]
> SD (Intercept: Item)        |    7.89e-03 | [0.07, 0.13]
> SD (Residual)               |        0.26 | [0.25, 0.27]
estimate_means(model, at = c("Answer", "Phrasing")) |> 
  plot(show_data = "none") 

Lies and RT

  • The faster they answer, the more confident they are in their lies.
# Adjustments for beta models
df$Confidence[df$Confidence == 1] <- 0.99999
df$Confidence[df$Confidence == 0] <- 0.00001

model <- glmmTMB(Confidence ~ RT * Answer + Phrasing + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

parameters::parameters(model, effects = "fixed")
> # Fixed Effects
> 
> Parameter           | Coefficient |   SE |         95% CI |     z |      p
> --------------------------------------------------------------------------
> (Intercept)         |        0.77 | 0.13 | [ 0.51,  1.04] |  5.80 | < .001
> RT                  |       -0.25 | 0.03 | [-0.30, -0.20] | -9.53 | < .001
> Answer [Truth]      |       -0.02 | 0.15 | [-0.31,  0.26] | -0.16 | 0.876 
> Phrasing [Indirect] |   -1.08e-03 | 0.05 | [-0.11,  0.10] | -0.02 | 0.984 
> RT * Answer [Truth] |        0.29 | 0.03 | [ 0.23,  0.35] |  9.03 | < .001
estimate_relation(model, at = c("RT", "Answer")) |> 
  plot(length = 50, point = list(alpha = 0.3, size = 3.5)) 

Effect of Condition

Confidence

  • Significant interaction between the condition and the answer: the effect of answer (being more confident in truths than in lies) is lower in the social condition.
  • Effect mostly driven by the social condition that increases the confidence in lies.
  • In other words: harder to lie in the polygraph condition: less obvious feedback cues?
model <- glmmTMB(Confidence ~ Answer * Condition + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

parameters::parameters(model, effects = "fixed")
> # Fixed Effects
> 
> Parameter                           | Coefficient |   SE |         95% CI |     z |      p
> ------------------------------------------------------------------------------------------
> (Intercept)                         |       -0.34 | 0.08 | [-0.51, -0.18] | -4.08 | < .001
> Answer [Truth]                      |        1.29 | 0.08 | [ 1.14,  1.44] | 16.45 | < .001
> Condition [Social]                  |        0.14 | 0.08 | [-0.01,  0.29] |  1.78 | 0.075 
> Answer [Truth] * Condition [Social] |       -0.22 | 0.11 | [-0.43, -0.01] | -2.06 | 0.039
estimate_means(model, at = c("Condition", "Answer")) |> 
  plot(show_data = "none") 

RT

  • Significant main effect of the condition: people are slower in the polygraph condition.
  • Consistent with the “less intuitive cues.”
model <- glmmTMB(RT ~ Answer * Condition + (1|Participant) + (1|Item), 
                 data = df)

parameters::parameters(model, effects = "fixed")
> # Fixed Effects
> 
> Parameter                           | Coefficient |   SE |         95% CI |     z |      p
> ------------------------------------------------------------------------------------------
> (Intercept)                         |        4.42 | 0.24 | [ 3.96,  4.89] | 18.57 | < .001
> Answer [Truth]                      |        0.07 | 0.07 | [-0.07,  0.21] |  1.00 | 0.316 
> Condition [Social]                  |       -0.51 | 0.07 | [-0.65, -0.37] | -7.05 | < .001
> Answer [Truth] * Condition [Social] |   -5.48e-03 | 0.10 | [-0.20,  0.19] | -0.05 | 0.957
estimate_means(model, at = c("Condition", "Answer")) |> 
  plot(show_data = "none") 

Theory of Mind / Empathy

Yoni Task

  • When instructed to lie, the decrease in confidence in participants with higher yoni score is less in social than polygraph condition.

Total Score

Confidence

model <- glmmTMB(Confidence ~ Answer / (Condition * YONI_Total) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

get_parameters <- function(model) {
  # Parameters
  params <- parameters::parameters(model, effects = "fixed") 
  # Marginal effects
  at <- c("Answer", "Condition")
  trend <- insight::find_predictors(model)$conditional
  trend <- trend[!trend %in% at]
  marg <- modelbased::estimate_slopes(model, trend = trend, at = at)
  # Output
  list(params = params, marginal_effects = marg)
}

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                     | Coefficient |   SE |         95% CI |     z |      p
> ----------------------------------------------------------------------------------------------------
> (Intercept)                                   |        2.70 | 0.95 | [ 0.84,  4.56] |  2.85 | 0.004 
> Answer [Truth]                                |       -3.67 | 0.89 | [-5.41, -1.92] | -4.12 | < .001
> Answer [Lie] * ConditionSocial                |       -2.47 | 0.90 | [-4.23, -0.71] | -2.76 | 0.006 
> Answer [Truth] * ConditionSocial              |        2.06 | 0.88 | [ 0.35,  3.78] |  2.36 | 0.018 
> Answer [Lie] * YONI Total                     |       -0.04 | 0.01 | [-0.06, -0.01] | -3.22 | 0.001 
> Answer [Truth] * YONI Total                   |        0.02 | 0.01 | [ 0.00,  0.04] |  2.04 | 0.041 
> Answer [Lie] * ConditionSocial * YONI Total   |        0.03 | 0.01 | [ 0.01,  0.05] |  2.91 | 0.004 
> Answer [Truth] * ConditionSocial * YONI Total |       -0.03 | 0.01 | [-0.05, -0.01] | -2.46 | 0.014
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |         95% CI | t(1980) |     p
> --------------------------------------------------------------------------
> Polygraph |    Lie |       -0.04 | 0.01 | [-0.06, -0.01] |   -3.22 | 0.001
> Social    |    Lie |   -5.13e-03 | 0.01 | [-0.03,  0.02] |   -0.46 | 0.643
> Polygraph |  Truth |        0.02 | 0.01 | [ 0.00,  0.04] |    2.04 | 0.042
> Social    |  Truth |   -2.66e-03 | 0.01 | [-0.02,  0.02] |   -0.24 | 0.807
> Marginal effects estimated for YONI_Total
plot_effect <- function(model, results, var = "YONI_Total", outcome = "Confidence") {
  data <- df |> 
    group_by(Participant, Answer, Condition) |> 
    summarise({{var}} := mean(.data[[var]], na.rm = TRUE),
              SD = sd(.data[[outcome]], na.rm = TRUE),
              {{outcome}} := mean(.data[[outcome]], na.rm = TRUE),
              CI_low = .data[[outcome]] - SD / 2,
              CI_high = .data[[outcome]] + SD / 2) 

  link_data <- estimate_relation(model, at = c("Condition", var, "Answer"), length = 30)
  range_x <- diff(range(data[[var]]))

  annot <- results$marginal_effects  
  annot$Label <- insight::format_p(annot$p, stars_only = TRUE)
  annot$x <- mean(range(data[[var]]))
  annot$x <- ifelse(annot$Condition == "Polygraph", 
                    annot$x - 0.05 * range_x, 
                    annot$x + 0.05 * range_x)
  annot$y <- max(data[[outcome]]) - 0.01 * diff(range(data[[outcome]]))
    
  
  p <- ggplot(link_data, aes_string(x = var, y = "Predicted")) +
    geom_pointrange(data = data, 
                    aes_string(y = outcome, 
                               color = "Condition", 
                               ymin = "CI_low", 
                               ymax = "CI_high"), 
                    position = position_dodge(width = 0.02 * range_x)) +
    geom_ribbon(aes(ymin = CI_low, ymax = CI_high, fill = Condition), alpha = 0.33) + 
    geom_line(aes(color = Condition)) +
    geom_text(data=annot, aes(x = x, y = y, label = Label, color = Condition), 
              size = 8, show.legend = FALSE) +
    labs(y = ifelse(outcome == "RT", "Reaction Time (s)", "Confidence"), 
         x = paste0(stringr::str_replace(var, "_", " ("), ")")) +
    scale_color_manual(values = c("Polygraph" = "#FF5722", "Social" = "#2196F3")) +
    scale_fill_manual(values = c("Polygraph" = "#FF5722", "Social" = "#2196F3")) + 
    facet_wrap(~Answer) 
  
  # Narrow y range
  if(outcome == "Confidence") {
    p <- p +
      coord_cartesian(ylim = c(0, 1)) +
      scale_y_continuous(expand=expansion(c(0, 0))) 
  }
  p
}

p_conf_yoni_total <- plot_effect(model, results, var = "YONI_Total", outcome = "Confidence")
# p_conf_yoni_total

RT

model <- glmmTMB(RT ~ Answer / (Condition * YONI_Total) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                     | Coefficient |       SE |         95% CI |     z |      p
> --------------------------------------------------------------------------------------------------------
> (Intercept)                                   |        0.60 |     2.53 | [-4.37,  5.57] |  0.24 | 0.813 
> Answer [Truth]                                |        2.81 |     0.81 | [ 1.23,  4.40] |  3.48 | < .001
> Answer [Lie] * ConditionSocial                |        1.35 |     0.81 | [-0.24,  2.93] |  1.67 | 0.095 
> Answer [Truth] * ConditionSocial              |       -1.49 |     0.81 | [-3.07,  0.09] | -1.85 | 0.065 
> Answer [Lie] * YONI Total                     |        0.04 |     0.03 | [-0.01,  0.10] |  1.52 | 0.130 
> Answer [Truth] * YONI Total                   |        0.01 |     0.03 | [-0.05,  0.07] |  0.43 | 0.668 
> Answer [Lie] * ConditionSocial * YONI Total   |       -0.02 | 9.42e-03 | [-0.04,  0.00] | -2.30 | 0.021 
> Answer [Truth] * ConditionSocial * YONI Total |        0.01 | 9.42e-03 | [-0.01,  0.03] |  1.22 | 0.223
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |        95% CI | t(1989) |     p
> -------------------------------------------------------------------------
> Polygraph |    Lie |        0.04 | 0.03 | [-0.01, 0.10] |    1.52 | 0.130
> Social    |    Lie |        0.02 | 0.03 | [-0.03, 0.08] |    0.78 | 0.435
> Polygraph |  Truth |        0.01 | 0.03 | [-0.05, 0.07] |    0.43 | 0.668
> Social    |  Truth |        0.02 | 0.03 | [-0.03, 0.08] |    0.82 | 0.414
> Marginal effects estimated for YONI_Total
p_rt_yoni_total <- plot_effect(model, results, var = "YONI_Total", outcome = "RT")
# p_rt_yoni_total

Cognitive Theory of Mind

Confidence

model <- glmmTMB(Confidence ~ Answer / (Condition * YONI_Cognitive) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                         | Coefficient |   SE |         95% CI |     z |      p
> --------------------------------------------------------------------------------------------------------
> (Intercept)                                       |        3.32 | 0.82 | [ 1.71,  4.94] |  4.03 | < .001
> Answer [Truth]                                    |       -3.68 | 0.77 | [-5.19, -2.18] | -4.80 | < .001
> Answer [Lie] * ConditionSocial                    |       -3.13 | 0.78 | [-4.66, -1.60] | -4.00 | < .001
> Answer [Truth] * ConditionSocial                  |        1.24 | 0.76 | [-0.24,  2.73] |  1.64 | 0.101 
> Answer [Lie] * YONI Cognitive                     |       -0.12 | 0.03 | [-0.17, -0.07] | -4.47 | < .001
> Answer [Truth] * YONI Cognitive                   |        0.04 | 0.03 | [-0.01,  0.09] |  1.60 | 0.109 
> Answer [Lie] * ConditionSocial * YONI Cognitive   |        0.10 | 0.03 | [ 0.06,  0.15] |  4.19 | < .001
> Answer [Truth] * ConditionSocial * YONI Cognitive |       -0.04 | 0.02 | [-0.09,  0.00] | -1.75 | 0.079
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |         95% CI | t(1980) |      p
> ---------------------------------------------------------------------------
> Polygraph |    Lie |       -0.12 | 0.03 | [-0.17, -0.07] |   -4.47 | < .001
> Social    |    Lie |       -0.01 | 0.03 | [-0.07,  0.04] |   -0.49 | 0.624 
> Polygraph |  Truth |        0.04 | 0.03 | [-0.01,  0.09] |    1.60 | 0.109 
> Social    |  Truth |   -3.60e-04 | 0.03 | [-0.05,  0.05] |   -0.01 | 0.989 
> Marginal effects estimated for YONI_Cognitive
p_conf_yoni_cognitive <- plot_effect(model, results, var = "YONI_Cognitive", outcome = "Confidence")
# p_conf_yoni_cognitive

RT

model <- glmmTMB(RT ~ Answer / (Condition * YONI_Cognitive) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                         | Coefficient |   SE |         95% CI |     z |      p
> --------------------------------------------------------------------------------------------------------
> (Intercept)                                       |        0.42 | 2.24 | [-3.96,  4.80] |  0.19 | 0.851 
> Answer [Truth]                                    |        2.39 | 0.72 | [ 0.98,  3.79] |  3.32 | < .001
> Answer [Lie] * ConditionSocial                    |        1.60 | 0.72 | [ 0.19,  3.01] |  2.22 | 0.026 
> Answer [Truth] * ConditionSocial                  |       -1.03 | 0.72 | [-2.44,  0.38] | -1.44 | 0.151 
> Answer [Lie] * YONI Cognitive                     |        0.13 | 0.07 | [-0.01,  0.27] |  1.80 | 0.072 
> Answer [Truth] * YONI Cognitive                   |        0.05 | 0.07 | [-0.09,  0.20] |  0.76 | 0.447 
> Answer [Lie] * ConditionSocial * YONI Cognitive   |       -0.07 | 0.02 | [-0.11, -0.02] | -2.95 | 0.003 
> Answer [Truth] * ConditionSocial * YONI Cognitive |        0.02 | 0.02 | [-0.03,  0.06] |  0.73 | 0.468
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |        95% CI | t(1989) |     p
> -------------------------------------------------------------------------
> Polygraph |    Lie |        0.13 | 0.07 | [-0.01, 0.27] |    1.80 | 0.072
> Social    |    Lie |        0.06 | 0.07 | [-0.08, 0.20] |    0.85 | 0.393
> Polygraph |  Truth |        0.05 | 0.07 | [-0.09, 0.20] |    0.76 | 0.447
> Social    |  Truth |        0.07 | 0.07 | [-0.07, 0.21] |    0.99 | 0.320
> Marginal effects estimated for YONI_Cognitive
p_rt_yoni_cognitive <- plot_effect(model, results, var = "YONI_Cognitive", outcome = "RT")
# p_rt_yoni_cognitive

Affective Theory of Mind

Confidence

model <- glmmTMB(Confidence ~ Answer / (Condition * YONI_Affective) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                         | Coefficient |   SE |        95% CI |     z |     p
> ------------------------------------------------------------------------------------------------------
> (Intercept)                                       |        0.30 | 1.07 | [-1.80, 2.41] |  0.28 | 0.777
> Answer [Truth]                                    |       -0.09 | 1.02 | [-2.10, 1.91] | -0.09 | 0.927
> Answer [Lie] * ConditionSocial                    |       -1.29 | 1.02 | [-3.29, 0.70] | -1.27 | 0.204
> Answer [Truth] * ConditionSocial                  |        1.40 | 1.02 | [-0.59, 3.39] |  1.38 | 0.168
> Answer [Lie] * YONI Affective                     |       -0.02 | 0.03 | [-0.06, 0.03] | -0.61 | 0.544
> Answer [Truth] * YONI Affective                   |        0.02 | 0.03 | [-0.03, 0.07] |  0.68 | 0.498
> Answer [Lie] * ConditionSocial * YONI Affective   |        0.03 | 0.02 | [-0.01, 0.08] |  1.41 | 0.159
> Answer [Truth] * ConditionSocial * YONI Affective |       -0.04 | 0.02 | [-0.08, 0.01] | -1.47 | 0.142
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |        95% CI | t(1980) |     p
> -------------------------------------------------------------------------
> Polygraph |    Lie |       -0.02 | 0.03 | [-0.06, 0.03] |   -0.61 | 0.544
> Social    |    Lie |        0.02 | 0.03 | [-0.03, 0.07] |    0.72 | 0.469
> Polygraph |  Truth |        0.02 | 0.03 | [-0.03, 0.07] |    0.68 | 0.498
> Social    |  Truth |       -0.02 | 0.03 | [-0.07, 0.03] |   -0.71 | 0.478
> Marginal effects estimated for YONI_Affective
p_conf_yoni_affective <- plot_effect(model, results, var = "YONI_Affective", outcome = "Confidence")
# p_conf_yoni_affective

RT

model <- glmmTMB(RT ~ Answer / (Condition * YONI_Affective) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                         | Coefficient |   SE |        95% CI |     z |     p
> ------------------------------------------------------------------------------------------------------
> (Intercept)                                       |        1.12 | 2.88 | [-4.53, 6.77] |  0.39 | 0.698
> Answer [Truth]                                    |        2.06 | 0.92 | [ 0.26, 3.86] |  2.24 | 0.025
> Answer [Lie] * ConditionSocial                    |        0.27 | 0.92 | [-1.53, 2.07] |  0.30 | 0.766
> Answer [Truth] * ConditionSocial                  |       -1.72 | 0.92 | [-3.52, 0.08] | -1.87 | 0.061
> Answer [Lie] * YONI Affective                     |        0.08 | 0.07 | [-0.05, 0.21] |  1.15 | 0.250
> Answer [Truth] * YONI Affective                   |        0.03 | 0.07 | [-0.10, 0.16] |  0.46 | 0.647
> Answer [Lie] * ConditionSocial * YONI Affective   |       -0.02 | 0.02 | [-0.06, 0.02] | -0.85 | 0.394
> Answer [Truth] * ConditionSocial * YONI Affective |        0.03 | 0.02 | [-0.01, 0.07] |  1.32 | 0.187
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |        95% CI | t(1989) |     p
> -------------------------------------------------------------------------
> Polygraph |    Lie |        0.08 | 0.07 | [-0.06, 0.21] |    1.15 | 0.250
> Social    |    Lie |        0.06 | 0.07 | [-0.07, 0.19] |    0.88 | 0.380
> Polygraph |  Truth |        0.03 | 0.07 | [-0.10, 0.16] |    0.46 | 0.647
> Social    |  Truth |        0.06 | 0.07 | [-0.07, 0.19] |    0.88 | 0.380
> Marginal effects estimated for YONI_Affective
p_rt_yoni_affective <- plot_effect(model, results, var = "YONI_Affective", outcome = "RT")
# p_rt_yoni_affective

Physical Theory of Mind

Confidence

model <- glmmTMB(Confidence ~ Answer / (Condition * YONI_Physical) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                        | Coefficient |   SE |         95% CI |     z |     p
> ------------------------------------------------------------------------------------------------------
> (Intercept)                                      |        0.87 | 0.40 | [ 0.09,  1.65] |  2.18 | 0.029
> Answer [Truth]                                   |       -1.06 | 0.37 | [-1.79, -0.34] | -2.87 | 0.004
> Answer [Lie] * ConditionSocial                   |       -0.42 | 0.37 | [-1.15,  0.30] | -1.14 | 0.253
> Answer [Truth] * ConditionSocial                 |        0.99 | 0.37 | [ 0.28,  1.71] |  2.71 | 0.007
> Answer [Lie] * YONI Physical                     |       -0.10 | 0.03 | [-0.16, -0.04] | -3.11 | 0.002
> Answer [Truth] * YONI Physical                   |        0.09 | 0.03 | [ 0.03,  0.16] |  2.94 | 0.003
> Answer [Lie] * ConditionSocial * YONI Physical   |        0.05 | 0.03 | [-0.01,  0.10] |  1.52 | 0.128
> Answer [Truth] * ConditionSocial * YONI Physical |       -0.09 | 0.03 | [-0.15, -0.03] | -2.98 | 0.003
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |         95% CI | t(1980) |     p
> --------------------------------------------------------------------------
> Polygraph |    Lie |       -0.10 | 0.03 | [-0.16, -0.04] |   -3.11 | 0.002
> Social    |    Lie |       -0.05 | 0.03 | [-0.12,  0.01] |   -1.70 | 0.090
> Polygraph |  Truth |        0.09 | 0.03 | [ 0.03,  0.16] |    2.94 | 0.003
> Social    |  Truth |    5.67e-03 | 0.03 | [-0.06,  0.07] |    0.18 | 0.859
> Marginal effects estimated for YONI_Physical
p_conf_yoni_physical <- plot_effect(model, results, var = "YONI_Physical", outcome = "Confidence")
# p_conf_yoni_physical

RT

model <- glmmTMB(RT ~ Answer / (Condition * YONI_Physical) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                        | Coefficient |   SE |         95% CI |     z |      p
> -------------------------------------------------------------------------------------------------------
> (Intercept)                                      |        3.56 | 1.08 | [ 1.44,  5.69] |  3.28 | 0.001 
> Answer [Truth]                                   |        1.18 | 0.34 | [ 0.51,  1.84] |  3.46 | < .001
> Answer [Lie] * ConditionSocial                   |        0.20 | 0.34 | [-0.46,  0.87] |  0.60 | 0.551 
> Answer [Truth] * ConditionSocial                 |       -0.85 | 0.34 | [-1.51, -0.18] | -2.49 | 0.013 
> Answer [Lie] * YONI Physical                     |        0.07 | 0.09 | [-0.10,  0.24] |  0.82 | 0.414 
> Answer [Truth] * YONI Physical                   |       -0.02 | 0.09 | [-0.19,  0.15] | -0.23 | 0.820 
> Answer [Lie] * ConditionSocial * YONI Physical   |       -0.06 | 0.03 | [-0.11,  0.00] | -2.13 | 0.033 
> Answer [Truth] * ConditionSocial * YONI Physical |        0.03 | 0.03 | [-0.03,  0.08] |  1.01 | 0.312
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |        95% CI | t(1989) |     p
> -------------------------------------------------------------------------
> Polygraph |    Lie |        0.07 | 0.09 | [-0.10, 0.24] |    0.82 | 0.414
> Social    |    Lie |        0.01 | 0.09 | [-0.16, 0.18] |    0.15 | 0.883
> Polygraph |  Truth |       -0.02 | 0.09 | [-0.19, 0.15] |   -0.23 | 0.820
> Social    |  Truth |    7.82e-03 | 0.09 | [-0.16, 0.18] |    0.09 | 0.929
> Marginal effects estimated for YONI_Physical
p_rt_yoni_physical <- plot_effect(model, results, var = "YONI_Physical", outcome = "RT")
# p_rt_yoni_physical

Correlation with LIE Scale

get_correlation <- function(var = "YONI_", var2 = "LIE_") {
  r <- correlation(select(dfsub, starts_with(var2)),
                 select(dfsub, starts_with(var)), 
                 p_adjust = "none") |> 
  mutate(Parameter1 = paste0(str_replace(Parameter1, "_", " ("), ")"),
         Parameter2 = paste0(str_replace(Parameter2, "_", " ("), ")"))

  p <- summary(r) |> 
    plot() +
    theme_minimal()
  list(r = r, plot = p)
}

r <- get_correlation(var = "YONI_")
r$plot

Summary

p_conf_yoni_total / 
  p_conf_yoni_cognitive / 
  p_conf_yoni_affective / 
  p_conf_yoni_physical +
  patchwork::plot_annotation(title = "Theory of Mind", theme = theme(plot.title = element_text(hjust = 0.5)))

p_rt_yoni_total / 
  p_rt_yoni_cognitive / 
  p_rt_yoni_affective / 
  p_rt_yoni_physical +
  patchwork::plot_annotation(title = "Theory of Mind", theme = theme(plot.title = element_text(hjust = 0.5)))

BES

Total Score

Confidence

model <- glmmTMB(Confidence ~ Answer / (Condition * BES_Total) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                    | Coefficient |       SE |         95% CI |     z |      p
> -------------------------------------------------------------------------------------------------------
> (Intercept)                                  |        2.29 |     0.74 | [ 0.84,  3.73] |  3.10 | 0.002 
> Answer [Truth]                               |       -3.03 |     0.66 | [-4.31, -1.74] | -4.62 | < .001
> Answer [Lie] * ConditionSocial               |       -1.58 |     0.67 | [-2.91, -0.26] | -2.35 | 0.019 
> Answer [Truth] * ConditionSocial             |        1.00 |     0.67 | [-0.30,  2.31] |  1.51 | 0.131 
> Answer [Lie] * BES Total                     |       -0.03 | 9.77e-03 | [-0.05, -0.02] | -3.57 | < .001
> Answer [Truth] * BES Total                   |        0.02 | 9.86e-03 | [ 0.00,  0.04] |  2.28 | 0.022 
> Answer [Lie] * ConditionSocial * BES Total   |        0.02 | 8.92e-03 | [ 0.01,  0.04] |  2.54 | 0.011 
> Answer [Truth] * ConditionSocial * BES Total |       -0.01 | 8.81e-03 | [-0.03,  0.00] | -1.63 | 0.102
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |       SE |         95% CI | t(1980) |      p
> -------------------------------------------------------------------------------
> Polygraph |    Lie |       -0.03 | 9.77e-03 | [-0.05, -0.02] |   -3.57 | < .001
> Social    |    Lie |       -0.01 |     0.01 | [-0.03,  0.01] |   -1.21 | 0.225 
> Polygraph |  Truth |        0.02 | 9.86e-03 | [ 0.00,  0.04] |    2.28 | 0.023 
> Social    |  Truth |    8.11e-03 | 9.89e-03 | [-0.01,  0.03] |    0.82 | 0.413 
> Marginal effects estimated for BES_Total
p_conf_bes_total <- plot_effect(model, results, var = "BES_Total", outcome = "Confidence")
# p_conf_bes_total

RT

model <- glmmTMB(RT ~ Answer / (Condition * BES_Total) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                    | Coefficient |       SE |         95% CI |     z |     p
> ------------------------------------------------------------------------------------------------------
> (Intercept)                                  |        4.80 |     2.08 | [ 0.73,  8.87] |  2.31 | 0.021
> Answer [Truth]                               |        1.96 |     0.66 | [ 0.66,  3.25] |  2.97 | 0.003
> Answer [Lie] * ConditionSocial               |        1.27 |     0.66 | [-0.02,  2.56] |  1.93 | 0.054
> Answer [Truth] * ConditionSocial             |       -1.16 |     0.66 | [-2.45,  0.13] | -1.76 | 0.078
> Answer [Lie] * BES Total                     |   -5.05e-03 |     0.03 | [-0.06,  0.05] | -0.18 | 0.855
> Answer [Truth] * BES Total                   |       -0.03 |     0.03 | [-0.08,  0.02] | -1.10 | 0.273
> Answer [Lie] * ConditionSocial * BES Total   |       -0.02 | 8.76e-03 | [-0.04, -0.01] | -2.72 | 0.007
> Answer [Truth] * ConditionSocial * BES Total |    8.68e-03 | 8.76e-03 | [-0.01,  0.03] |  0.99 | 0.322
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |        95% CI | t(1989) |     p
> -------------------------------------------------------------------------
> Polygraph |    Lie |   -5.05e-03 | 0.03 | [-0.06, 0.05] |   -0.18 | 0.855
> Social    |    Lie |       -0.03 | 0.03 | [-0.08, 0.03] |   -1.05 | 0.296
> Polygraph |  Truth |       -0.03 | 0.03 | [-0.08, 0.02] |   -1.10 | 0.273
> Social    |  Truth |       -0.02 | 0.03 | [-0.08, 0.03] |   -0.78 | 0.435
> Marginal effects estimated for BES_Total
p_rt_bes_total <- plot_effect(model, results, var = "BES_Total", outcome = "RT")
# p_rt_bes_total

Cognitive Empathy

Confidence

model <- glmmTMB(Confidence ~ Answer / (Condition * BES_Cognitive) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                        | Coefficient |   SE |        95% CI |     z |     p
> -----------------------------------------------------------------------------------------------------
> (Intercept)                                      |        0.72 | 0.65 | [-0.55, 1.99] |  1.11 | 0.266
> Answer [Truth]                                   |       -0.36 | 0.58 | [-1.51, 0.78] | -0.62 | 0.533
> Answer [Lie] * ConditionSocial                   |       -0.46 | 0.60 | [-1.63, 0.72] | -0.76 | 0.446
> Answer [Truth] * ConditionSocial                 |       -0.31 | 0.58 | [-1.46, 0.83] | -0.54 | 0.591
> Answer [Lie] * BES Cognitive                     |       -0.03 | 0.02 | [-0.07, 0.01] | -1.65 | 0.099
> Answer [Truth] * BES Cognitive                   |        0.02 | 0.02 | [-0.02, 0.05] |  0.92 | 0.358
> Answer [Lie] * ConditionSocial * BES Cognitive   |        0.02 | 0.02 | [-0.02, 0.05] |  0.99 | 0.323
> Answer [Truth] * ConditionSocial * BES Cognitive |    6.44e-03 | 0.02 | [-0.03, 0.04] |  0.39 | 0.694
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |        95% CI | t(1980) |     p
> -------------------------------------------------------------------------
> Polygraph |    Lie |       -0.03 | 0.02 | [-0.07, 0.01] |   -1.65 | 0.099
> Social    |    Lie |       -0.01 | 0.02 | [-0.05, 0.02] |   -0.73 | 0.466
> Polygraph |  Truth |        0.02 | 0.02 | [-0.02, 0.05] |    0.92 | 0.358
> Social    |  Truth |        0.02 | 0.02 | [-0.01, 0.06] |    1.27 | 0.206
> Marginal effects estimated for BES_Cognitive
p_conf_bes_cognitive <- plot_effect(model, results, var = "BES_Cognitive", outcome = "Confidence")
# p_conf_bes_cognitive

RT

model <- glmmTMB(RT ~ Answer / (Condition * BES_Cognitive) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                        | Coefficient |   SE |         95% CI |     z |      p
> -------------------------------------------------------------------------------------------------------
> (Intercept)                                      |        5.43 | 1.75 | [ 2.00,  8.86] |  3.10 | 0.002 
> Answer [Truth]                                   |        1.13 | 0.57 | [ 0.02,  2.24] |  2.00 | 0.046 
> Answer [Lie] * ConditionSocial                   |        2.01 | 0.57 | [ 0.90,  3.12] |  3.54 | < .001
> Answer [Truth] * ConditionSocial                 |        0.25 | 0.57 | [-0.87,  1.36] |  0.43 | 0.665 
> Answer [Lie] * BES Cognitive                     |       -0.03 | 0.05 | [-0.12,  0.07] | -0.58 | 0.562 
> Answer [Truth] * BES Cognitive                   |       -0.06 | 0.05 | [-0.15,  0.04] | -1.19 | 0.234 
> Answer [Lie] * ConditionSocial * BES Cognitive   |       -0.07 | 0.02 | [-0.10, -0.04] | -4.47 | < .001
> Answer [Truth] * ConditionSocial * BES Cognitive |       -0.02 | 0.02 | [-0.05,  0.01] | -1.35 | 0.178
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |         95% CI | t(1989) |     p
> --------------------------------------------------------------------------
> Polygraph |    Lie |       -0.03 | 0.05 | [-0.12,  0.07] |   -0.58 | 0.562
> Social    |    Lie |       -0.10 | 0.05 | [-0.20,  0.00] |   -2.03 | 0.043
> Polygraph |  Truth |       -0.06 | 0.05 | [-0.15,  0.04] |   -1.19 | 0.234
> Social    |  Truth |       -0.08 | 0.05 | [-0.18,  0.02] |   -1.63 | 0.104
> Marginal effects estimated for BES_Cognitive
p_rt_bes_cognitive <- plot_effect(model, results, var = "BES_Cognitive", outcome = "RT")
# p_rt_bes_cognitive

Affective Empathy

Confidence

model <- glmmTMB(Confidence ~ Answer / (Condition * BES_Affective) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                        | Coefficient |   SE |         95% CI |     z |      p
> -------------------------------------------------------------------------------------------------------
> (Intercept)                                      |        1.99 | 0.58 | [ 0.86,  3.12] |  3.46 | < .001
> Answer [Truth]                                   |       -2.60 | 0.52 | [-3.62, -1.59] | -5.03 | < .001
> Answer [Lie] * ConditionSocial                   |       -1.50 | 0.53 | [-2.53, -0.46] | -2.84 | 0.005 
> Answer [Truth] * ConditionSocial                 |        1.36 | 0.52 | [ 0.33,  2.38] |  2.59 | 0.010 
> Answer [Lie] * BES Affective                     |       -0.06 | 0.01 | [-0.09, -0.03] | -4.09 | < .001
> Answer [Truth] * BES Affective                   |        0.04 | 0.01 | [ 0.01,  0.07] |  2.70 | 0.007 
> Answer [Lie] * ConditionSocial * BES Affective   |        0.04 | 0.01 | [ 0.01,  0.07] |  3.10 | 0.002 
> Answer [Truth] * ConditionSocial * BES Affective |       -0.04 | 0.01 | [-0.06, -0.01] | -2.75 | 0.006
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |         95% CI | t(1980) |      p
> ---------------------------------------------------------------------------
> Polygraph |    Lie |       -0.06 | 0.01 | [-0.09, -0.03] |   -4.09 | < .001
> Social    |    Lie |       -0.02 | 0.01 | [-0.05,  0.01] |   -1.21 | 0.225 
> Polygraph |  Truth |        0.04 | 0.01 | [ 0.01,  0.07] |    2.70 | 0.007 
> Social    |  Truth |    3.24e-03 | 0.01 | [-0.03,  0.03] |    0.22 | 0.823 
> Marginal effects estimated for BES_Affective
p_conf_bes_affective <- plot_effect(model, results, var = "BES_Affective", outcome = "Confidence")
# p_conf_bes_affective

RT

model <- glmmTMB(RT ~ Answer / (Condition * BES_Affective) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                        | Coefficient |   SE |         95% CI |     z |      p
> -------------------------------------------------------------------------------------------------------
> (Intercept)                                      |        4.13 | 1.63 | [ 0.93,  7.33] |  2.53 | 0.012 
> Answer [Truth]                                   |        1.44 | 0.51 | [ 0.44,  2.45] |  2.82 | 0.005 
> Answer [Lie] * ConditionSocial                   |       -0.30 | 0.51 | [-1.31,  0.70] | -0.59 | 0.554 
> Answer [Truth] * ConditionSocial                 |       -1.80 | 0.51 | [-2.80, -0.79] | -3.51 | < .001
> Answer [Lie] * BES Affective                     |    7.53e-03 | 0.04 | [-0.07,  0.09] |  0.18 | 0.854 
> Answer [Truth] * BES Affective                   |       -0.03 | 0.04 | [-0.11,  0.05] | -0.67 | 0.506 
> Answer [Lie] * ConditionSocial * BES Affective   |   -5.15e-03 | 0.01 | [-0.03,  0.02] | -0.40 | 0.688 
> Answer [Truth] * ConditionSocial * BES Affective |        0.03 | 0.01 | [ 0.01,  0.06] |  2.53 | 0.011
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |        95% CI | t(1989) |     p
> -------------------------------------------------------------------------
> Polygraph |    Lie |    7.53e-03 | 0.04 | [-0.07, 0.09] |    0.18 | 0.854
> Social    |    Lie |    2.38e-03 | 0.04 | [-0.08, 0.08] |    0.06 | 0.954
> Polygraph |  Truth |       -0.03 | 0.04 | [-0.11, 0.05] |   -0.67 | 0.506
> Social    |  Truth |    5.28e-03 | 0.04 | [-0.07, 0.09] |    0.13 | 0.897
> Marginal effects estimated for BES_Affective
p_rt_bes_affective <- plot_effect(model, results, var = "BES_Affective", outcome = "RT")
# p_rt_bes_affective

Correlation with LIE Scale

r <- get_correlation(var = "BES_")
r$plot

Summary

p_conf_bes_total / 
  p_conf_bes_cognitive / 
  p_conf_bes_affective +
  patchwork::plot_annotation(title = "Empathy", theme = theme(plot.title = element_text(hjust = 0.5)))

p_rt_bes_total / 
  p_rt_bes_cognitive / 
  p_rt_bes_affective +
  patchwork::plot_annotation(title = "Empathy", theme = theme(plot.title = element_text(hjust = 0.5)))

Interoception

Heartbeat Counting

Accuracy

Confidence

model <- glmmTMB(Confidence ~ Answer / (Condition * HCT_Accuracy) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                       | Coefficient |   SE |         95% CI |     z |      p
> ------------------------------------------------------------------------------------------------------
> (Intercept)                                     |       -1.17 | 0.26 | [-1.68, -0.67] | -4.57 | < .001
> Answer [Truth]                                  |        2.76 | 0.23 | [ 2.30,  3.22] | 11.86 | < .001
> Answer [Lie] * ConditionSocial                  |        0.62 | 0.23 | [ 0.16,  1.08] |  2.67 | 0.008 
> Answer [Truth] * ConditionSocial                |       -0.59 | 0.23 | [-1.04, -0.14] | -2.56 | 0.010 
> Answer [Lie] * HCT Accuracy                     |        1.37 | 0.40 | [ 0.59,  2.16] |  3.44 | < .001
> Answer [Truth] * HCT Accuracy                   |       -1.06 | 0.40 | [-1.84, -0.28] | -2.68 | 0.007 
> Answer [Lie] * ConditionSocial * HCT Accuracy   |       -0.81 | 0.36 | [-1.52, -0.09] | -2.21 | 0.027 
> Answer [Truth] * ConditionSocial * HCT Accuracy |        0.85 | 0.36 | [ 0.15,  1.55] |  2.37 | 0.018
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |         95% CI | t(1980) |      p
> ---------------------------------------------------------------------------
> Polygraph |    Lie |        1.37 | 0.40 | [ 0.59,  2.16] |    3.44 | < .001
> Social    |    Lie |        0.57 | 0.40 | [-0.22,  1.35] |    1.42 | 0.155 
> Polygraph |  Truth |       -1.06 | 0.40 | [-1.84, -0.28] |   -2.68 | 0.008 
> Social    |  Truth |       -0.21 | 0.40 | [-0.99,  0.57] |   -0.53 | 0.595 
> Marginal effects estimated for HCT_Accuracy
p_conf_hct_accuracy <- plot_effect(model, results, var = "HCT_Accuracy", outcome = "Confidence")

RT

model <- glmmTMB(RT ~ Answer / (Condition * HCT_Accuracy) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                       | Coefficient |   SE |         95% CI |         z |      p
> ----------------------------------------------------------------------------------------------------------
> (Intercept)                                     |        4.87 | 0.70 | [ 3.49,  6.25] |      6.92 | < .001
> Answer [Truth]                                  |       -0.30 | 0.22 | [-0.74,  0.13] |     -1.37 | 0.170 
> Answer [Lie] * ConditionSocial                  |       -0.51 | 0.22 | [-0.94, -0.07] |     -2.28 | 0.022 
> Answer [Truth] * ConditionSocial                |       -0.30 | 0.22 | [-0.73,  0.13] |     -1.36 | 0.175 
> Answer [Lie] * HCT Accuracy                     |       -0.74 | 1.09 | [-2.88,  1.41] |     -0.67 | 0.501 
> Answer [Truth] * HCT Accuracy                   |       -0.12 | 1.09 | [-2.26,  2.02] |     -0.11 | 0.915 
> Answer [Lie] * ConditionSocial * HCT Accuracy   |   -1.95e-03 | 0.34 | [-0.68,  0.67] | -5.65e-03 | 0.995 
> Answer [Truth] * ConditionSocial * HCT Accuracy |       -0.35 | 0.34 | [-1.02,  0.33] |     -1.01 | 0.312
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |        95% CI | t(1989) |     p
> -------------------------------------------------------------------------
> Polygraph |    Lie |       -0.74 | 1.09 | [-2.88, 1.41] |   -0.67 | 0.501
> Social    |    Lie |       -0.74 | 1.09 | [-2.88, 1.40] |   -0.68 | 0.500
> Polygraph |  Truth |       -0.12 | 1.09 | [-2.26, 2.03] |   -0.11 | 0.915
> Social    |  Truth |       -0.47 | 1.09 | [-2.61, 1.68] |   -0.43 | 0.670
> Marginal effects estimated for HCT_Accuracy
p_rt_hct_accuracy <- plot_effect(model, results, var = "HCT_Accuracy", outcome = "RT")

Interoceptive Confidence

Confidence

model <- glmmTMB(Confidence ~ Answer / (Condition * HCT_Confidence) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                         | Coefficient |   SE |         95% CI |     z |      p
> --------------------------------------------------------------------------------------------------------
> (Intercept)                                       |       -0.90 | 0.17 | [-1.23, -0.58] | -5.39 | < .001
> Answer [Truth]                                    |        1.88 | 0.16 | [ 1.57,  2.20] | 11.60 | < .001
> Answer [Lie] * ConditionSocial                    |        0.45 | 0.16 | [ 0.13,  0.77] |  2.75 | 0.006 
> Answer [Truth] * ConditionSocial                  |       -0.40 | 0.16 | [-0.71, -0.08] | -2.48 | 0.013 
> Answer [Lie] * HCT Confidence                     |        1.11 | 0.29 | [ 0.54,  1.69] |  3.80 | < .001
> Answer [Truth] * HCT Confidence                   |       -0.07 | 0.29 | [-0.64,  0.50] | -0.25 | 0.804 
> Answer [Lie] * ConditionSocial * HCT Confidence   |       -0.63 | 0.29 | [-1.19, -0.06] | -2.17 | 0.030 
> Answer [Truth] * ConditionSocial * HCT Confidence |        0.63 | 0.28 | [ 0.08,  1.19] |  2.24 | 0.025
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |        95% CI | t(1980) |      p
> --------------------------------------------------------------------------
> Polygraph |    Lie |        1.11 | 0.29 | [ 0.54, 1.69] |    3.80 | < .001
> Social    |    Lie |        0.49 | 0.30 | [-0.10, 1.07] |    1.64 | 0.101 
> Polygraph |  Truth |       -0.07 | 0.29 | [-0.64, 0.50] |   -0.25 | 0.804 
> Social    |  Truth |        0.56 | 0.29 | [-0.02, 1.14] |    1.91 | 0.056 
> Marginal effects estimated for HCT_Confidence
p_conf_hct_confidence <- plot_effect(model, results, var = "HCT_Confidence", outcome = "Confidence")

RT

model <- glmmTMB(RT ~ Answer / (Condition * HCT_Confidence) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                         | Coefficient |   SE |         95% CI |     z |      p
> --------------------------------------------------------------------------------------------------------
> (Intercept)                                       |        5.41 | 0.45 | [ 4.53,  6.28] | 12.08 | < .001
> Answer [Truth]                                    |        0.03 | 0.15 | [-0.28,  0.33] |  0.17 | 0.868 
> Answer [Lie] * ConditionSocial                    |       -0.71 | 0.15 | [-1.01, -0.41] | -4.64 | < .001
> Answer [Truth] * ConditionSocial                  |       -0.47 | 0.15 | [-0.77, -0.17] | -3.08 | 0.002 
> Answer [Lie] * HCT Confidence                     |       -1.96 | 0.78 | [-3.49, -0.43] | -2.51 | 0.012 
> Answer [Truth] * HCT Confidence                   |       -1.86 | 0.78 | [-3.40, -0.33] | -2.39 | 0.017 
> Answer [Lie] * ConditionSocial * HCT Confidence   |        0.41 | 0.27 | [-0.12,  0.94] |  1.52 | 0.129 
> Answer [Truth] * ConditionSocial * HCT Confidence |       -0.08 | 0.27 | [-0.61,  0.45] | -0.29 | 0.769
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |         95% CI | t(1989) |     p
> --------------------------------------------------------------------------
> Polygraph |    Lie |       -1.96 | 0.78 | [-3.49, -0.43] |   -2.51 | 0.012
> Social    |    Lie |       -1.55 | 0.78 | [-3.08, -0.01] |   -1.98 | 0.048
> Polygraph |  Truth |       -1.86 | 0.78 | [-3.40, -0.33] |   -2.39 | 0.017
> Social    |  Truth |       -1.94 | 0.78 | [-3.48, -0.41] |   -2.49 | 0.013
> Marginal effects estimated for HCT_Confidence
p_rt_hct_confidence <- plot_effect(model, results, var = "HCT_Confidence", outcome = "RT")

Interoceptive Awareness

Confidence

model <- glmmTMB(Confidence ~ Answer / (Condition * HCT_Awareness) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                        | Coefficient |   SE |         95% CI |     z |      p
> -------------------------------------------------------------------------------------------------------
> (Intercept)                                      |       -0.35 | 0.08 | [-0.52, -0.19] | -4.15 | < .001
> Answer [Truth]                                   |        1.31 | 0.08 | [ 1.16,  1.46] | 16.82 | < .001
> Answer [Lie] * ConditionSocial                   |        0.14 | 0.08 | [-0.01,  0.29] |  1.83 | 0.067 
> Answer [Truth] * ConditionSocial                 |       -0.09 | 0.08 | [-0.24,  0.06] | -1.14 | 0.254 
> Answer [Lie] * HCT Awareness                     |       -0.60 | 0.14 | [-0.87, -0.33] | -4.35 | < .001
> Answer [Truth] * HCT Awareness                   |        0.19 | 0.14 | [-0.08,  0.46] |  1.40 | 0.161 
> Answer [Lie] * ConditionSocial * HCT Awareness   |        0.58 | 0.13 | [ 0.33,  0.83] |  4.52 | < .001
> Answer [Truth] * ConditionSocial * HCT Awareness |   -3.67e-03 | 0.13 | [-0.25,  0.24] | -0.03 | 0.977
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |         95% CI | t(1980) |      p
> ---------------------------------------------------------------------------
> Polygraph |    Lie |       -0.60 | 0.14 | [-0.87, -0.33] |   -4.35 | < .001
> Social    |    Lie |       -0.03 | 0.14 | [-0.30,  0.25] |   -0.19 | 0.846 
> Polygraph |  Truth |        0.19 | 0.14 | [-0.08,  0.46] |    1.40 | 0.161 
> Social    |  Truth |        0.19 | 0.14 | [-0.08,  0.46] |    1.37 | 0.171 
> Marginal effects estimated for HCT_Awareness
p_conf_hct_awareness <- plot_effect(model, results, var = "HCT_Awareness", outcome = "Confidence")

RT

model <- glmmTMB(RT ~ Answer / (Condition * HCT_Awareness) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                        | Coefficient |   SE |         95% CI |     z |      p
> -------------------------------------------------------------------------------------------------------
> (Intercept)                                      |        4.45 | 0.22 | [ 4.01,  4.88] | 19.96 | < .001
> Answer [Truth]                                   |        0.07 | 0.07 | [-0.07,  0.21] |  0.93 | 0.350 
> Answer [Lie] * ConditionSocial                   |       -0.51 | 0.07 | [-0.65, -0.37] | -7.16 | < .001
> Answer [Truth] * ConditionSocial                 |       -0.51 | 0.07 | [-0.65, -0.37] | -7.16 | < .001
> Answer [Lie] * HCT Awareness                     |        0.92 | 0.35 | [ 0.22,  1.61] |  2.58 | 0.010 
> Answer [Truth] * HCT Awareness                   |        0.70 | 0.35 | [ 0.01,  1.40] |  1.98 | 0.047 
> Answer [Lie] * ConditionSocial * HCT Awareness   |       -0.32 | 0.12 | [-0.55, -0.08] | -2.66 | 0.008 
> Answer [Truth] * ConditionSocial * HCT Awareness |       -0.08 | 0.12 | [-0.31,  0.16] | -0.64 | 0.524
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |        95% CI | t(1989) |     p
> -------------------------------------------------------------------------
> Polygraph |    Lie |        0.92 | 0.35 | [ 0.22, 1.61] |    2.58 | 0.010
> Social    |    Lie |        0.60 | 0.35 | [-0.10, 1.29] |    1.68 | 0.093
> Polygraph |  Truth |        0.70 | 0.35 | [ 0.01, 1.40] |    1.98 | 0.047
> Social    |  Truth |        0.63 | 0.35 | [-0.07, 1.32] |    1.77 | 0.077
> Marginal effects estimated for HCT_Awareness
p_rt_hct_awareness <- plot_effect(model, results, var = "HCT_Awareness", outcome = "RT")

Correlation with LIE Scale

r <- get_correlation(var = "HCT_")
r$plot

# plot(correlation::cor_test(dfsub, "HCT_Accuracy", "LIE_Ability"))

Summary

p_conf_hct_accuracy / 
  p_conf_hct_confidence / 
  p_conf_hct_awareness +
  patchwork::plot_annotation(title = "Interoception", theme = theme(plot.title = element_text(hjust = 0.5)))

p_rt_hct_accuracy / 
  p_rt_hct_confidence / 
  p_rt_hct_awareness +
  patchwork::plot_annotation(title = "Interoception", theme = theme(plot.title = element_text(hjust = 0.5)))

MAIA

Total Score

Confidence

model <- glmmTMB(Confidence ~ Answer / (Condition * MAIA_Total) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                     | Coefficient |   SE |         95% CI |     z |      p
> ----------------------------------------------------------------------------------------------------
> (Intercept)                                   |       -2.39 | 0.40 | [-3.17, -1.60] | -5.97 | < .001
> Answer [Truth]                                |        3.93 | 0.37 | [ 3.20,  4.66] | 10.50 | < .001
> Answer [Lie] * ConditionSocial                |        1.48 | 0.38 | [ 0.73,  2.23] |  3.85 | < .001
> Answer [Truth] * ConditionSocial              |       -0.93 | 0.38 | [-1.67, -0.19] | -2.45 | 0.014 
> Answer [Lie] * MAIA Total                     |        0.75 | 0.14 | [ 0.47,  1.04] |  5.23 | < .001
> Answer [Truth] * MAIA Total                   |       -0.22 | 0.14 | [-0.50,  0.06] | -1.54 | 0.124 
> Answer [Lie] * ConditionSocial * MAIA Total   |       -0.50 | 0.14 | [-0.77, -0.23] | -3.60 | < .001
> Answer [Truth] * ConditionSocial * MAIA Total |        0.31 | 0.14 | [ 0.05,  0.58] |  2.30 | 0.022
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |        95% CI | t(1980) |      p
> --------------------------------------------------------------------------
> Polygraph |    Lie |        0.75 | 0.14 | [ 0.47, 1.04] |    5.23 | < .001
> Social    |    Lie |        0.26 | 0.15 | [-0.03, 0.54] |    1.76 | 0.079 
> Polygraph |  Truth |       -0.22 | 0.14 | [-0.50, 0.06] |   -1.54 | 0.124 
> Social    |  Truth |        0.09 | 0.15 | [-0.19, 0.38] |    0.64 | 0.521 
> Marginal effects estimated for MAIA_Total
p_conf_maia_total <- plot_effect(model, results, var = "MAIA_Total", outcome = "Confidence")

RT

model <- glmmTMB(RT ~ Answer / (Condition * MAIA_Total) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                     | Coefficient |   SE |         95% CI |     z |      p
> ----------------------------------------------------------------------------------------------------
> (Intercept)                                   |        7.47 | 1.07 | [ 5.38,  9.56] |  6.99 | < .001
> Answer [Truth]                                |       -0.19 | 0.36 | [-0.90,  0.52] | -0.53 | 0.596 
> Answer [Lie] * ConditionSocial                |       -2.21 | 0.36 | [-2.92, -1.50] | -6.12 | < .001
> Answer [Truth] * ConditionSocial              |       -1.65 | 0.36 | [-2.36, -0.94] | -4.57 | < .001
> Answer [Lie] * MAIA Total                     |       -1.12 | 0.38 | [-1.87, -0.37] | -2.91 | 0.004 
> Answer [Truth] * MAIA Total                   |       -1.02 | 0.38 | [-1.78, -0.27] | -2.66 | 0.008 
> Answer [Lie] * ConditionSocial * MAIA Total   |        0.63 | 0.13 | [ 0.37,  0.88] |  4.82 | < .001
> Answer [Truth] * ConditionSocial * MAIA Total |        0.42 | 0.13 | [ 0.16,  0.67] |  3.22 | 0.001
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |         95% CI | t(1989) |     p
> --------------------------------------------------------------------------
> Polygraph |    Lie |       -1.12 | 0.38 | [-1.87, -0.37] |   -2.91 | 0.004
> Social    |    Lie |       -0.49 | 0.38 | [-1.25,  0.26] |   -1.28 | 0.200
> Polygraph |  Truth |       -1.02 | 0.38 | [-1.78, -0.27] |   -2.66 | 0.008
> Social    |  Truth |       -0.60 | 0.38 | [-1.36,  0.15] |   -1.57 | 0.116
> Marginal effects estimated for MAIA_Total
p_rt_maia_total <- plot_effect(model, results, var = "MAIA_Total", outcome = "RT")

Noticing

Confidence

model <- glmmTMB(Confidence ~ Answer / (Condition * MAIA_Noticing) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                        | Coefficient |   SE |         95% CI |     z |      p
> -------------------------------------------------------------------------------------------------------
> (Intercept)                                      |       -1.64 | 0.37 | [-2.37, -0.92] | -4.45 | < .001
> Answer [Truth]                                   |        3.44 | 0.32 | [ 2.81,  4.08] | 10.69 | < .001
> Answer [Lie] * ConditionSocial                   |        1.70 | 0.34 | [ 1.03,  2.36] |  5.03 | < .001
> Answer [Truth] * ConditionSocial                 |       -0.57 | 0.33 | [-1.22,  0.08] | -1.71 | 0.087 
> Answer [Lie] * MAIA Noticing                     |        0.39 | 0.11 | [ 0.18,  0.60] |  3.65 | < .001
> Answer [Truth] * MAIA Noticing                   |       -0.25 | 0.11 | [-0.47, -0.04] | -2.34 | 0.019 
> Answer [Lie] * ConditionSocial * MAIA Noticing   |       -0.47 | 0.10 | [-0.66, -0.28] | -4.80 | < .001
> Answer [Truth] * ConditionSocial * MAIA Noticing |        0.15 | 0.10 | [-0.04,  0.33] |  1.52 | 0.130
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |         95% CI | t(1980) |      p
> ---------------------------------------------------------------------------
> Polygraph |    Lie |        0.39 | 0.11 | [ 0.18,  0.60] |    3.65 | < .001
> Social    |    Lie |       -0.08 | 0.11 | [-0.30,  0.14] |   -0.70 | 0.485 
> Polygraph |  Truth |       -0.25 | 0.11 | [-0.47, -0.04] |   -2.34 | 0.019 
> Social    |  Truth |       -0.11 | 0.11 | [-0.32,  0.11] |   -0.99 | 0.325 
> Marginal effects estimated for MAIA_Noticing
p_conf_maia_noticing <- plot_effect(model, results, var = "MAIA_Noticing", outcome = "Confidence")

RT

model <- glmmTMB(RT ~ Answer / (Condition * MAIA_Noticing) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                        | Coefficient |   SE |         95% CI |     z |      p
> -------------------------------------------------------------------------------------------------------
> (Intercept)                                      |        6.72 | 1.03 | [ 4.70,  8.73] |  6.52 | < .001
> Answer [Truth]                                   |       -0.98 | 0.33 | [-1.64, -0.33] | -2.96 | 0.003 
> Answer [Lie] * ConditionSocial                   |       -1.92 | 0.33 | [-2.57, -1.26] | -5.76 | < .001
> Answer [Truth] * ConditionSocial                 |       -0.75 | 0.33 | [-1.40, -0.10] | -2.25 | 0.024 
> Answer [Lie] * MAIA Noticing                     |       -0.68 | 0.30 | [-1.26, -0.10] | -2.28 | 0.022 
> Answer [Truth] * MAIA Noticing                   |       -0.36 | 0.30 | [-0.94,  0.22] | -1.23 | 0.218 
> Answer [Lie] * ConditionSocial * MAIA Noticing   |        0.42 | 0.10 | [ 0.23,  0.60] |  4.34 | < .001
> Answer [Truth] * ConditionSocial * MAIA Noticing |        0.07 | 0.10 | [-0.12,  0.26] |  0.73 | 0.465
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |         95% CI | t(1989) |     p
> --------------------------------------------------------------------------
> Polygraph |    Lie |       -0.68 | 0.30 | [-1.26, -0.10] |   -2.28 | 0.022
> Social    |    Lie |       -0.26 | 0.30 | [-0.84,  0.32] |   -0.88 | 0.379
> Polygraph |  Truth |       -0.36 | 0.30 | [-0.94,  0.22] |   -1.23 | 0.218
> Social    |  Truth |       -0.29 | 0.30 | [-0.87,  0.29] |   -0.99 | 0.320
> Marginal effects estimated for MAIA_Noticing
p_rt_maia_noticing <- plot_effect(model, results, var = "MAIA_Noticing", outcome = "RT")

Not Distracting

Confidence

model <- glmmTMB(Confidence ~ Answer / (Condition * MAIA_NotDistracting) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                              | Coefficient |   SE |         95% CI |     z |      p
> -------------------------------------------------------------------------------------------------------------
> (Intercept)                                            |       -0.79 | 0.17 | [-1.12, -0.45] | -4.60 | < .001
> Answer [Truth]                                         |        1.63 | 0.16 | [ 1.31,  1.95] | 10.02 | < .001
> Answer [Lie] * ConditionSocial                         |        0.32 | 0.16 | [ 0.01,  0.64] |  2.00 | 0.046 
> Answer [Truth] * ConditionSocial                       |    2.72e-03 | 0.16 | [-0.31,  0.32] |  0.02 | 0.986 
> Answer [Lie] * MAIA NotDistracting                     |        0.27 | 0.09 | [ 0.09,  0.45] |  2.95 | 0.003 
> Answer [Truth] * MAIA NotDistracting                   |        0.06 | 0.09 | [-0.11,  0.24] |  0.70 | 0.483 
> Answer [Lie] * ConditionSocial * MAIA NotDistracting   |       -0.11 | 0.09 | [-0.28,  0.06] | -1.30 | 0.194 
> Answer [Truth] * ConditionSocial * MAIA NotDistracting |       -0.05 | 0.09 | [-0.22,  0.11] | -0.63 | 0.527
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |        95% CI | t(1980) |     p
> -------------------------------------------------------------------------
> Polygraph |    Lie |        0.27 | 0.09 | [ 0.09, 0.45] |    2.95 | 0.003
> Social    |    Lie |        0.16 | 0.09 | [-0.02, 0.34] |    1.71 | 0.087
> Polygraph |  Truth |        0.06 | 0.09 | [-0.11, 0.24] |    0.70 | 0.483
> Social    |  Truth |    9.67e-03 | 0.09 | [-0.17, 0.19] |    0.11 | 0.915
> Marginal effects estimated for MAIA_NotDistracting
p_conf_maia_notdistracting <- plot_effect(model, results, var = "MAIA_NotDistracting", outcome = "Confidence")

RT

model <- glmmTMB(RT ~ Answer / (Condition * MAIA_NotDistracting) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                              | Coefficient |   SE |         95% CI |     z |      p
> -------------------------------------------------------------------------------------------------------------
> (Intercept)                                            |        4.60 | 0.49 | [ 3.64,  5.56] |  9.38 | < .001
> Answer [Truth]                                         |       -0.07 | 0.15 | [-0.37,  0.23] | -0.46 | 0.645 
> Answer [Lie] * ConditionSocial                         |       -0.49 | 0.15 | [-0.79, -0.19] | -3.23 | 0.001 
> Answer [Truth] * ConditionSocial                       |       -0.23 | 0.15 | [-0.53,  0.07] | -1.49 | 0.137 
> Answer [Lie] * MAIA NotDistracting                     |       -0.11 | 0.26 | [-0.62,  0.40] | -0.41 | 0.680 
> Answer [Truth] * MAIA NotDistracting                   |       -0.02 | 0.26 | [-0.53,  0.49] | -0.08 | 0.936 
> Answer [Lie] * ConditionSocial * MAIA NotDistracting   |   -7.52e-03 | 0.08 | [-0.17,  0.15] | -0.09 | 0.927 
> Answer [Truth] * ConditionSocial * MAIA NotDistracting |       -0.17 | 0.08 | [-0.34, -0.01] | -2.10 | 0.036
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |        95% CI | t(1989) |     p
> -------------------------------------------------------------------------
> Polygraph |    Lie |       -0.11 | 0.26 | [-0.62, 0.41] |   -0.41 | 0.680
> Social    |    Lie |       -0.12 | 0.26 | [-0.63, 0.40] |   -0.44 | 0.659
> Polygraph |  Truth |       -0.02 | 0.26 | [-0.53, 0.49] |   -0.08 | 0.936
> Social    |  Truth |       -0.19 | 0.26 | [-0.71, 0.32] |   -0.74 | 0.458
> Marginal effects estimated for MAIA_NotDistracting
p_rt_maia_notdistracting <- plot_effect(model, results, var = "MAIA_NotDistracting", outcome = "RT")

Body Listening

Confidence

model <- glmmTMB(Confidence ~ Answer / (Condition * MAIA_BodyListening) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                             | Coefficient |   SE |         95% CI |     z |      p
> ------------------------------------------------------------------------------------------------------------
> (Intercept)                                           |       -1.26 | 0.20 | [-1.64, -0.87] | -6.41 | < .001
> Answer [Truth]                                        |        2.25 | 0.19 | [ 1.89,  2.62] | 12.15 | < .001
> Answer [Lie] * ConditionSocial                        |        0.79 | 0.19 | [ 0.42,  1.15] |  4.22 | < .001
> Answer [Truth] * ConditionSocial                      |       -0.12 | 0.18 | [-0.47,  0.24] | -0.63 | 0.526 
> Answer [Lie] * MAIA BodyListening                     |        0.36 | 0.07 | [ 0.22,  0.49] |  5.13 | < .001
> Answer [Truth] * MAIA BodyListening                   |       -0.02 | 0.07 | [-0.15,  0.12] | -0.25 | 0.802 
> Answer [Lie] * ConditionSocial * MAIA BodyListening   |       -0.26 | 0.07 | [-0.39, -0.13] | -3.85 | < .001
> Answer [Truth] * ConditionSocial * MAIA BodyListening |        0.01 | 0.06 | [-0.12,  0.14] |  0.18 | 0.855
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |        95% CI | t(1980) |      p
> --------------------------------------------------------------------------
> Polygraph |    Lie |        0.36 | 0.07 | [ 0.22, 0.49] |    5.13 | < .001
> Social    |    Lie |        0.10 | 0.07 | [-0.04, 0.24] |    1.43 | 0.153 
> Polygraph |  Truth |       -0.02 | 0.07 | [-0.15, 0.12] |   -0.25 | 0.802 
> Social    |  Truth |   -5.43e-03 | 0.07 | [-0.14, 0.13] |   -0.08 | 0.937 
> Marginal effects estimated for MAIA_BodyListening
p_conf_maia_bodylistening <- plot_effect(model, results, var = "MAIA_BodyListening", outcome = "Confidence")

RT

model <- glmmTMB(RT ~ Answer / (Condition * MAIA_BodyListening) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
> # Fixed Effects
> 
> Parameter                                             | Coefficient |   SE |         95% CI |     z |      p
> ------------------------------------------------------------------------------------------------------------
> (Intercept)                                           |        5.85 | 0.53 | [ 4.81,  6.89] | 11.04 | < .001
> Answer [Truth]                                        |       -0.03 | 0.18 | [-0.38,  0.31] | -0.19 | 0.847 
> Answer [Lie] * ConditionSocial                        |       -1.36 | 0.18 | [-1.71, -1.01] | -7.69 | < .001
> Answer [Truth] * ConditionSocial                      |       -1.19 | 0.18 | [-1.54, -0.84] | -6.73 | < .001
> Answer [Lie] * MAIA BodyListening                     |       -0.55 | 0.19 | [-0.92, -0.19] | -2.96 | 0.003 
> Answer [Truth] * MAIA BodyListening                   |       -0.51 | 0.19 | [-0.88, -0.15] | -2.74 | 0.006 
> Answer [Lie] * ConditionSocial * MAIA BodyListening   |        0.33 | 0.06 | [ 0.21,  0.45] |  5.27 | < .001
> Answer [Truth] * ConditionSocial * MAIA BodyListening |        0.26 | 0.06 | [ 0.14,  0.39] |  4.19 | < .001
results$marginal_effects
> Estimated Marginal Effects
> 
> Condition | Answer | Coefficient |   SE |         95% CI | t(1989) |     p
> --------------------------------------------------------------------------
> Polygraph |    Lie |       -0.55 | 0.19 | [-0.92, -0.19] |   -2.96 | 0.003
> Social    |    Lie |       -0.22 | 0.19 | [-0.59,  0.14] |   -1.19 | 0.235
> Polygraph |  Truth |       -0.51 | 0.19 | [-0.88, -0.15] |   -2.74 | 0.006
> Social    |  Truth |       -0.25 | 0.19 | [-0.62,  0.12] |   -1.33 | 0.183
> Marginal effects estimated for MAIA_BodyListening
p_rt_maia_bodylistening <- plot_effect(model, results, var = "MAIA_BodyListening", outcome = "RT")

Correlation with LIE Scale

r <- get_correlation(var = "MAIA_")
r$plot +
  theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust=1))

Summary

p_conf_maia_total / 
  p_conf_maia_noticing / 
  p_conf_maia_notdistracting / 
  p_conf_maia_bodylistening +
  patchwork::plot_annotation(title = "Interoception (MAIA)", theme = theme(plot.title = element_text(hjust = 0.5)))

p_rt_maia_total / 
  p_rt_maia_noticing / 
  p_rt_maia_notdistracting / 
  p_rt_maia_bodylistening +
  patchwork::plot_annotation(title = "Interoception (MAIA)", theme = theme(plot.title = element_text(hjust = 0.5)))

Full Code

The full script of executive code contained in this document is reproduced here.

# Set up the environment (or use local alternative `source("utils/config.R")`)
source("https://raw.githubusercontent.com/RealityBending/TemplateResults/main/utils/config.R")
options(dplyr.summarise.inform = FALSE) 
knitr::opts_chunk$set(echo = TRUE)
library(ggplot2)
theme_set(see::theme_modern())
# This chunk is a bit complex so don't worry about it: it's made to add badges to the HTML versions
# NOTE: You have to replace the links accordingly to have working "buttons" on the HTML versions
if (!knitr::is_latex_output() && knitr::is_html_output()) {
  cat("![Build](https://github.com/RealityBending/TemplateResults/workflows/Build/badge.svg)
      [![Website](https://img.shields.io/badge/repo-Readme-2196F3)](https://github.com/RealityBending/TemplateResults)
      [![Website](https://img.shields.io/badge/visit-website-E91E63)](https://realitybending.github.io/TemplateResults/)
      [![Website](https://img.shields.io/badge/download-.docx-FF5722)](https://github.com/RealityBending/TemplateResults/raw/main/word_and_pdf/SupplementaryMaterials.docx)
      [![Website](https://img.shields.io/badge/see-.pdf-FF9800)](https://github.com/RealityBending/TemplateResults/blob/main/word_and_pdf/SupplementaryMaterials.pdf)")
}
library(tidyverse)
library(patchwork)
library(glmmTMB)
library(report)
library(parameters)
library(correlation)
library(modelbased)
library(performance)
library(see)

summary(report::report(sessionInfo()))
# setwd("C:/Users/user/Desktop/Sputnik/2019-23/DeceptionInteroTom")

df <- read.csv("data/data_combined.csv") %>% 
  mutate(ID = as.factor(paste0("S", ID)),
         condition = as.factor(condition),
         item = as.factor(item),
         style = as.factor(style),
         instruction = as.factor(instruction)) |> 
  #TODO: This renaming should be done at the preprocessing stage
  rename("Participant" = "ID",
         "Condition" = "condition",
         "Item" = "item",
         "Phrasing" = "style",
         "Answer" = "instruction",
         "YONI_Total" = "yoni_total",
         "YONI_Affective" = "yoni_affective",
         "YONI_Cognitive" = "yoni_cognitive",
         "YONI_Physical" = "yoni_physical",
         "BES_Total" = "BES_total",
         "BES_Cognitive" = "BES_cognitive",
         "BES_Affective" = "BES_affective",
         "HCT_Confidence" = "HCT_confidence",
         "HCT_Accuracy" = "HCT_accuracy",
         "HCT_Awareness" = "HCT_awareness",
         "MAIA_Total" = "MAIA_total",
         "MAIA_AttentionRegulation" = "MAIA_attention_regulation",
         "MAIA_BodyListening" = "MAIA_body_listening",
         "MAIA_EmotionalAwareness" = "MAIA_emotional_awareness",
         "MAIA_NotDistracting" = "MAIA_not_distracting",
         "MAIA_NotWorrying" = "MAIA_not_worrying",
         "MAIA_Noticing" = "MAIA_noticing",
         "MAIA_SelfRegulation" = "MAIA_self_regulation",
         "MAIA_Trusting" = "MAIA_trusting",
         "LIE_Ability" = "lie_ability",
         "LIE_Frequency" = "lie_frequency",
         "LIE_Negativity" = "lie_negativity",
         "LIE_Contextuality" = "lie_contextuality",
         "Confidence" = "DT_confidence",
         "RT" = "DT_RT") |> 
  mutate(Answer = fct_recode(Answer, Lie = "LIE", Truth = "TRUTH")) |> 
  select(-HCT_guess, -HCT_noguess, -HCT_onebreath)

cat(paste("The data consists of",
          report::report_participants(df,
                                      participants = "Participant",
                                      sex = "Gender",
                                      age = "Age")))
report::cite_packages(sessionInfo())
df %>% 
  group_by(Participant) %>% 
  select(starts_with("YONI_")) |> 
  summarise_all(mean, na.rm=TRUE) |> 
  tidyr::pivot_longer(-Participant, values_to = "Scores") |> 
  mutate(name = paste0(str_replace(name, "_", " ("), ")")) |> 
  ggplot(aes(x = Scores, fill = name)) +
  geom_density() +
  scale_fill_manual(values = c("YONI (Affective)" = "Purple",
                                 "YONI (Cognitive)" = "Blue",
                                 "YONI (Physical)" = "Green",
                                 "YONI (Total)"= "DarkBlue"),
                      guide = "none") +
  facet_wrap(~name, scales = "free")
df %>% 
  group_by(Participant) %>% 
  select(starts_with("BES_")) |> 
  summarise_all(mean, na.rm=TRUE) |> 
  tidyr::pivot_longer(-Participant, values_to = "Scores") |> 
  mutate(name = paste0(str_replace(name, "_", " ("), ")")) |> 
  ggplot(aes(x = Scores, fill = name)) +
  geom_density() +
  scale_fill_manual(values = c("BES (Affective)" = "Purple",
                               "BES (Cognitive)" = "Blue",
                               "BES (Total)"= "DarkBlue"),
                      guide = "none") +
  facet_wrap(~name, scales = "free")
df %>% 
  group_by(Participant) %>% 
  select(starts_with("HCT_")) |> 
  summarise_all(mean, na.rm=TRUE) |> 
  tidyr::pivot_longer(-Participant, values_to = "Scores") |> 
  mutate(name = paste0(str_replace(name, "_", " ("), ")")) |> 
  ggplot(aes(x = Scores, fill = name)) +
  geom_density() +
  scale_fill_manual(values = c("HCT (Accuracy)" = "Red",
                               "HCT (Awareness)" = "Orange",
                               "HCT (Confidence)"= "DarkOrange"),
                      guide = "none") +
  facet_wrap(~name, scales = "free")
df %>% 
  group_by(Participant) %>% 
  select(starts_with("MAIA_")) |> 
  summarise_all(mean, na.rm=TRUE) |> 
  tidyr::pivot_longer(-Participant, values_to = "Scores") |> 
  mutate(name = paste0(str_replace(name, "_", " ("), ")")) |> 
  ggplot(aes(x = Scores, fill = name)) +
  geom_density() +
  scale_fill_brewer(palette = "Reds", guide = "none") +
  facet_wrap(~name, scales = "free")
df %>% 
  group_by(Participant) %>% 
  select(starts_with("LIE_")) |> 
  summarise_all(mean, na.rm=TRUE) |> 
  tidyr::pivot_longer(-Participant, values_to = "Scores") |> 
  mutate(name = paste0(str_replace(name, "_", " ("), ")")) |> 
  ggplot(aes(x = Scores, fill = name)) +
  geom_density() +
  scale_fill_manual(values = c("LIE (Ability)" = "#2196F3",
                               "LIE (Frequency)" = "#4CAF50",
                               "LIE (Contextuality)"= "#FF9800",
                               "LIE (Negativity)"= "#E91E63"),
                    guide = "none") +
  facet_wrap(~name, scales = "free")

df |> 
  group_by(Participant, Answer) |> 
  summarise(Confidence = paste(insight::format_value(mean(Confidence, na.rm = TRUE)),
                               " +- ",
                               insight::format_value(sd(Confidence, na.rm = TRUE))),
            RT = paste(insight::format_value(mean(RT, na.rm = TRUE)),
                       " +- ",
                       insight::format_value(sd(RT, na.rm = TRUE)))) |> 
  arrange(Participant) |> 
  knitr::kable()
df <- df |> 
  dplyr::filter(Participant != "S9",  # Extreme answers
                !Participant %in% c("S3", "S15", "S19", "S23"))  # No data
p1 <- df |> 
  dplyr::filter(!Participant %in% c("S29")) |>
  ggplot(aes(x = Confidence, fill = Participant)) +
  geom_density(alpha = 0.1) +
  see::scale_fill_material_d(palette = "rainbow", guide = "none") +
  see::theme_modern() +
  scale_x_continuous(labels = scales::percent, expand=expansion(c(0, .05))) +
  scale_y_continuous(expand=expansion(c(0, .05))) +
  facet_wrap(~Answer)
p2 <- df |> 
  dplyr::filter(!Participant %in% c("S29")) |> 
  ggplot(aes(x = RT, fill = Participant)) +
  geom_density(alpha = 0.1) +
  see::scale_fill_material_d(palette = "rainbow", guide = "none") +
  scale_x_continuous(expand=expansion(c(0, .05))) +
  scale_y_continuous(expand=expansion(c(0, .05))) +
  facet_wrap(~Answer)
p1 / p2
dfsub <- df |> 
  select(Participant, 
         starts_with("YONI_"), 
         starts_with("BES_"),
         starts_with("HCT_"),
         starts_with("MAIA_"),
         starts_with("LIE_")) |> 
  group_by(Participant) |> 
  summarise_all(mean)
r <- correlation(select(dfsub, starts_with("YONI_")),
                 select(dfsub, starts_with("BES_")), 
                 p_adjust = "none")

summary(r) |> 
  plot()
r <- correlation(select(dfsub, starts_with("MAIA_")),
                 select(dfsub, starts_with("HCT_")), 
                 p_adjust = "none")

summary(r) |> 
  plot()
r <- correlation(select(dfsub, starts_with(c("MAIA_", "HCT_"))),
                 select(dfsub, starts_with(c("YONI_", "BES_"))), 
                 p_adjust = "none")

summary(r) |> 
  plot()
model <- glmmTMB(RT ~ Answer * Phrasing + (1|Participant) + (1|Item), data = df) 

parameters::parameters(model, effects = "fixed")
estimate_means(model, at = c("Answer", "Phrasing")) |> 
  plot(show_data = "none") 
model <- glmmTMB(Confidence ~ Answer * Phrasing + (1|Participant) + (1|Item), data = df) 

parameters::parameters(model)
estimate_means(model, at = c("Answer", "Phrasing")) |> 
  plot(show_data = "none") 
# Adjustments for beta models
df$Confidence[df$Confidence == 1] <- 0.99999
df$Confidence[df$Confidence == 0] <- 0.00001

model <- glmmTMB(Confidence ~ RT * Answer + Phrasing + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

parameters::parameters(model, effects = "fixed")
estimate_relation(model, at = c("RT", "Answer")) |> 
  plot(length = 50, point = list(alpha = 0.3, size = 3.5)) 
model <- glmmTMB(Confidence ~ Answer * Condition + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

parameters::parameters(model, effects = "fixed")
estimate_means(model, at = c("Condition", "Answer")) |> 
  plot(show_data = "none") 
model <- glmmTMB(RT ~ Answer * Condition + (1|Participant) + (1|Item), 
                 data = df)

parameters::parameters(model, effects = "fixed")
estimate_means(model, at = c("Condition", "Answer")) |> 
  plot(show_data = "none") 
model <- glmmTMB(Confidence ~ Answer / (Condition * YONI_Total) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

get_parameters <- function(model) {
  # Parameters
  params <- parameters::parameters(model, effects = "fixed") 
  # Marginal effects
  at <- c("Answer", "Condition")
  trend <- insight::find_predictors(model)$conditional
  trend <- trend[!trend %in% at]
  marg <- modelbased::estimate_slopes(model, trend = trend, at = at)
  # Output
  list(params = params, marginal_effects = marg)
}

results <- get_parameters(model)
results$params
results$marginal_effects
plot_effect <- function(model, results, var = "YONI_Total", outcome = "Confidence") {
  data <- df |> 
    group_by(Participant, Answer, Condition) |> 
    summarise({{var}} := mean(.data[[var]], na.rm = TRUE),
              SD = sd(.data[[outcome]], na.rm = TRUE),
              {{outcome}} := mean(.data[[outcome]], na.rm = TRUE),
              CI_low = .data[[outcome]] - SD / 2,
              CI_high = .data[[outcome]] + SD / 2) 

  link_data <- estimate_relation(model, at = c("Condition", var, "Answer"), length = 30)
  range_x <- diff(range(data[[var]]))

  annot <- results$marginal_effects  
  annot$Label <- insight::format_p(annot$p, stars_only = TRUE)
  annot$x <- mean(range(data[[var]]))
  annot$x <- ifelse(annot$Condition == "Polygraph", 
                    annot$x - 0.05 * range_x, 
                    annot$x + 0.05 * range_x)
  annot$y <- max(data[[outcome]]) - 0.01 * diff(range(data[[outcome]]))
    
  
  p <- ggplot(link_data, aes_string(x = var, y = "Predicted")) +
    geom_pointrange(data = data, 
                    aes_string(y = outcome, 
                               color = "Condition", 
                               ymin = "CI_low", 
                               ymax = "CI_high"), 
                    position = position_dodge(width = 0.02 * range_x)) +
    geom_ribbon(aes(ymin = CI_low, ymax = CI_high, fill = Condition), alpha = 0.33) + 
    geom_line(aes(color = Condition)) +
    geom_text(data=annot, aes(x = x, y = y, label = Label, color = Condition), 
              size = 8, show.legend = FALSE) +
    labs(y = ifelse(outcome == "RT", "Reaction Time (s)", "Confidence"), 
         x = paste0(stringr::str_replace(var, "_", " ("), ")")) +
    scale_color_manual(values = c("Polygraph" = "#FF5722", "Social" = "#2196F3")) +
    scale_fill_manual(values = c("Polygraph" = "#FF5722", "Social" = "#2196F3")) + 
    facet_wrap(~Answer) 
  
  # Narrow y range
  if(outcome == "Confidence") {
    p <- p +
      coord_cartesian(ylim = c(0, 1)) +
      scale_y_continuous(expand=expansion(c(0, 0))) 
  }
  p
}

p_conf_yoni_total <- plot_effect(model, results, var = "YONI_Total", outcome = "Confidence")
# p_conf_yoni_total
model <- glmmTMB(RT ~ Answer / (Condition * YONI_Total) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
results$marginal_effects
p_rt_yoni_total <- plot_effect(model, results, var = "YONI_Total", outcome = "RT")
# p_rt_yoni_total
model <- glmmTMB(Confidence ~ Answer / (Condition * YONI_Cognitive) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
results$marginal_effects
p_conf_yoni_cognitive <- plot_effect(model, results, var = "YONI_Cognitive", outcome = "Confidence")
# p_conf_yoni_cognitive
model <- glmmTMB(RT ~ Answer / (Condition * YONI_Cognitive) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
results$marginal_effects
p_rt_yoni_cognitive <- plot_effect(model, results, var = "YONI_Cognitive", outcome = "RT")
# p_rt_yoni_cognitive
model <- glmmTMB(Confidence ~ Answer / (Condition * YONI_Affective) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
results$marginal_effects
p_conf_yoni_affective <- plot_effect(model, results, var = "YONI_Affective", outcome = "Confidence")
# p_conf_yoni_affective
model <- glmmTMB(RT ~ Answer / (Condition * YONI_Affective) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
results$marginal_effects
p_rt_yoni_affective <- plot_effect(model, results, var = "YONI_Affective", outcome = "RT")
# p_rt_yoni_affective
model <- glmmTMB(Confidence ~ Answer / (Condition * YONI_Physical) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
results$marginal_effects
p_conf_yoni_physical <- plot_effect(model, results, var = "YONI_Physical", outcome = "Confidence")
# p_conf_yoni_physical
model <- glmmTMB(RT ~ Answer / (Condition * YONI_Physical) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
results$marginal_effects
p_rt_yoni_physical <- plot_effect(model, results, var = "YONI_Physical", outcome = "RT")
# p_rt_yoni_physical
get_correlation <- function(var = "YONI_", var2 = "LIE_") {
  r <- correlation(select(dfsub, starts_with(var2)),
                 select(dfsub, starts_with(var)), 
                 p_adjust = "none") |> 
  mutate(Parameter1 = paste0(str_replace(Parameter1, "_", " ("), ")"),
         Parameter2 = paste0(str_replace(Parameter2, "_", " ("), ")"))

  p <- summary(r) |> 
    plot() +
    theme_minimal()
  list(r = r, plot = p)
}

r <- get_correlation(var = "YONI_")
r$plot
p_conf_yoni_total / 
  p_conf_yoni_cognitive / 
  p_conf_yoni_affective / 
  p_conf_yoni_physical +
  patchwork::plot_annotation(title = "Theory of Mind", theme = theme(plot.title = element_text(hjust = 0.5)))

p_rt_yoni_total / 
  p_rt_yoni_cognitive / 
  p_rt_yoni_affective / 
  p_rt_yoni_physical +
  patchwork::plot_annotation(title = "Theory of Mind", theme = theme(plot.title = element_text(hjust = 0.5)))
model <- glmmTMB(Confidence ~ Answer / (Condition * BES_Total) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
results$marginal_effects
p_conf_bes_total <- plot_effect(model, results, var = "BES_Total", outcome = "Confidence")
# p_conf_bes_total
model <- glmmTMB(RT ~ Answer / (Condition * BES_Total) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
results$marginal_effects
p_rt_bes_total <- plot_effect(model, results, var = "BES_Total", outcome = "RT")
# p_rt_bes_total
model <- glmmTMB(Confidence ~ Answer / (Condition * BES_Cognitive) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
results$marginal_effects
p_conf_bes_cognitive <- plot_effect(model, results, var = "BES_Cognitive", outcome = "Confidence")
# p_conf_bes_cognitive
model <- glmmTMB(RT ~ Answer / (Condition * BES_Cognitive) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
results$marginal_effects
p_rt_bes_cognitive <- plot_effect(model, results, var = "BES_Cognitive", outcome = "RT")
# p_rt_bes_cognitive
model <- glmmTMB(Confidence ~ Answer / (Condition * BES_Affective) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
results$marginal_effects
p_conf_bes_affective <- plot_effect(model, results, var = "BES_Affective", outcome = "Confidence")
# p_conf_bes_affective
model <- glmmTMB(RT ~ Answer / (Condition * BES_Affective) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
results$marginal_effects
p_rt_bes_affective <- plot_effect(model, results, var = "BES_Affective", outcome = "RT")
# p_rt_bes_affective
r <- get_correlation(var = "BES_")
r$plot
p_conf_bes_total / 
  p_conf_bes_cognitive / 
  p_conf_bes_affective +
  patchwork::plot_annotation(title = "Empathy", theme = theme(plot.title = element_text(hjust = 0.5)))

p_rt_bes_total / 
  p_rt_bes_cognitive / 
  p_rt_bes_affective +
  patchwork::plot_annotation(title = "Empathy", theme = theme(plot.title = element_text(hjust = 0.5)))
model <- glmmTMB(Confidence ~ Answer / (Condition * HCT_Accuracy) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
results$marginal_effects
p_conf_hct_accuracy <- plot_effect(model, results, var = "HCT_Accuracy", outcome = "Confidence")
model <- glmmTMB(RT ~ Answer / (Condition * HCT_Accuracy) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
results$marginal_effects
p_rt_hct_accuracy <- plot_effect(model, results, var = "HCT_Accuracy", outcome = "RT")
model <- glmmTMB(Confidence ~ Answer / (Condition * HCT_Confidence) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
results$marginal_effects
p_conf_hct_confidence <- plot_effect(model, results, var = "HCT_Confidence", outcome = "Confidence")
model <- glmmTMB(RT ~ Answer / (Condition * HCT_Confidence) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
results$marginal_effects
p_rt_hct_confidence <- plot_effect(model, results, var = "HCT_Confidence", outcome = "RT")
model <- glmmTMB(Confidence ~ Answer / (Condition * HCT_Awareness) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
results$marginal_effects
p_conf_hct_awareness <- plot_effect(model, results, var = "HCT_Awareness", outcome = "Confidence")
model <- glmmTMB(RT ~ Answer / (Condition * HCT_Awareness) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
results$marginal_effects
p_rt_hct_awareness <- plot_effect(model, results, var = "HCT_Awareness", outcome = "RT")
r <- get_correlation(var = "HCT_")
r$plot

# plot(correlation::cor_test(dfsub, "HCT_Accuracy", "LIE_Ability"))
p_conf_hct_accuracy / 
  p_conf_hct_confidence / 
  p_conf_hct_awareness +
  patchwork::plot_annotation(title = "Interoception", theme = theme(plot.title = element_text(hjust = 0.5)))

p_rt_hct_accuracy / 
  p_rt_hct_confidence / 
  p_rt_hct_awareness +
  patchwork::plot_annotation(title = "Interoception", theme = theme(plot.title = element_text(hjust = 0.5)))
model <- glmmTMB(Confidence ~ Answer / (Condition * MAIA_Total) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
results$marginal_effects
p_conf_maia_total <- plot_effect(model, results, var = "MAIA_Total", outcome = "Confidence")
model <- glmmTMB(RT ~ Answer / (Condition * MAIA_Total) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
results$marginal_effects
p_rt_maia_total <- plot_effect(model, results, var = "MAIA_Total", outcome = "RT")
model <- glmmTMB(Confidence ~ Answer / (Condition * MAIA_Noticing) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
results$marginal_effects
p_conf_maia_noticing <- plot_effect(model, results, var = "MAIA_Noticing", outcome = "Confidence")
model <- glmmTMB(RT ~ Answer / (Condition * MAIA_Noticing) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
results$marginal_effects
p_rt_maia_noticing <- plot_effect(model, results, var = "MAIA_Noticing", outcome = "RT")
model <- glmmTMB(Confidence ~ Answer / (Condition * MAIA_NotDistracting) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
results$marginal_effects
p_conf_maia_notdistracting <- plot_effect(model, results, var = "MAIA_NotDistracting", outcome = "Confidence")
model <- glmmTMB(RT ~ Answer / (Condition * MAIA_NotDistracting) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
results$marginal_effects
p_rt_maia_notdistracting <- plot_effect(model, results, var = "MAIA_NotDistracting", outcome = "RT")
model <- glmmTMB(Confidence ~ Answer / (Condition * MAIA_BodyListening) + (1|Participant) + (1|Item), 
                 data = df, family = beta_family())

results <- get_parameters(model)
results$params
results$marginal_effects
p_conf_maia_bodylistening <- plot_effect(model, results, var = "MAIA_BodyListening", outcome = "Confidence")
model <- glmmTMB(RT ~ Answer / (Condition * MAIA_BodyListening) + (1|Participant) + (1|Item), 
                 data = df)

results <- get_parameters(model)
results$params
results$marginal_effects
p_rt_maia_bodylistening <- plot_effect(model, results, var = "MAIA_BodyListening", outcome = "RT")
r <- get_correlation(var = "MAIA_")
r$plot +
  theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust=1))
p_conf_maia_total / 
  p_conf_maia_noticing / 
  p_conf_maia_notdistracting / 
  p_conf_maia_bodylistening +
  patchwork::plot_annotation(title = "Interoception (MAIA)", theme = theme(plot.title = element_text(hjust = 0.5)))

p_rt_maia_total / 
  p_rt_maia_noticing / 
  p_rt_maia_notdistracting / 
  p_rt_maia_bodylistening +
  patchwork::plot_annotation(title = "Interoception (MAIA)", theme = theme(plot.title = element_text(hjust = 0.5)))

Package References

report::cite_packages(sessionInfo())
  • Ben-Shachar M, Lüdecke D, Makowski D (2020). effectsize: Estimation of Effect Size Indices and Standardized Parameters. Journal of Open Source Software, 5(56), 2815. doi: 10.21105/joss.02815
  • H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016.
  • Hadley Wickham (2019). stringr: Simple, Consistent Wrappers for Common String Operations. R package version 1.4.0. https://CRAN.R-project.org/package=stringr
  • Hadley Wickham (2021). forcats: Tools for Working with Categorical Variables (Factors). R package version 0.5.1. https://CRAN.R-project.org/package=forcats
  • Hadley Wickham (2021). tidyr: Tidy Messy Data. R package version 1.1.4. https://CRAN.R-project.org/package=tidyr
  • Hadley Wickham and Jim Hester (2021). readr: Read Rectangular Text Data. R package version 2.0.2. https://CRAN.R-project.org/package=readr
  • Hadley Wickham, Romain François, Lionel Henry and Kirill Müller (2021). dplyr: A Grammar of Data Manipulation. R package version 1.0.7. https://CRAN.R-project.org/package=dplyr
  • Kirill Müller and Hadley Wickham (2021). tibble: Simple Data Frames. R package version 3.1.4. https://CRAN.R-project.org/package=tibble
  • Lionel Henry and Hadley Wickham (2020). purrr: Functional Programming Tools. R package version 0.3.4. https://CRAN.R-project.org/package=purrr
  • Lüdecke D, Ben-Shachar M, Patil I, Makowski D (2020). “Extracting,Computing and Exploring the Parameters of Statistical Models using R.”Journal of Open Source Software, 5(53), 2445. doi:10.21105/joss.02445 (URL: https://doi.org/10.21105/joss.02445).
  • Lüdecke D, Waggoner P, Makowski D (2019). “insight: A Unified Interfaceto Access Information from Model Objects in R.” Journal of Open SourceSoftware, 4(38), 1412. doi: 10.21105/joss.01412 (URL:https://doi.org/10.21105/joss.01412).
  • Lüdecke et al., (2021). performance: An R Package for Assessment, Comparison and Testing of Statistical Models. Journal of Open Source Software, 6(60), 3139. https://doi.org/10.21105/joss.03139
  • Lüdecke et al., (2021). see: An R Package for Visualizing Statistical Models. Journal of Open Source Software, 6(64), 3393. https://doi.org/10.21105/joss.03393
  • Makowski, D., Ben-Shachar, M. S. & Lüdecke, D. (2020). The {easystats} collection of R packages. GitHub.
  • Makowski, D., Ben-Shachar, M. S., Patil, I., & Lüdecke, D. (2019). Methods and Algorithms for Correlation Analysis in R. Journal of Open Source Software, 5(51), 2306. doi:10.21105/joss.02306
  • Makowski, D., Ben-Shachar, M. S., Patil, I., & Lüdecke, D. (2020). Estimation of Model-Based Predictions, Contrasts and Means. CRAN.
  • Makowski, D., Ben-Shachar, M., & Lüdecke, D. (2019). bayestestR: Describing Effects and their Uncertainty, Existence and Significance within the Bayesian Framework. Journal of Open Source Software, 4(40), 1541. doi:10.21105/joss.01541
  • Makowski, D., Ben-Shachar, M.S., Patil, I. & Lüdecke, D. (2020). Automated Results Reporting as a Practical Tool to Improve Reproducibility and Methodological Best Practices Adoption. CRAN. Available from https://github.com/easystats/report. doi: .
  • Makowski, Lüdecke, Patil, Ben-Shachar, & Wiernik (2021). datawizard: Easy Data Wrangling. CRAN. Available from https://easystats.github.io/datawizard/
  • Mollie E. Brooks, Kasper Kristensen, Koen J. van Benthem, Arni Magnusson, Casper W. Berg, Anders Nielsen, Hans J. Skaug, Martin Maechler and Benjamin M. Bolker (2017). glmmTMB Balances Speed and Flexibility Among Packages for Zero-inflated Generalized Linear Mixed Modeling. The R Journal, 9(2), 378-400.
  • R Core Team (2021). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL https://www.R-project.org/.
  • Thomas Lin Pedersen (2020). patchwork: The Composer of Plots. R package version 1.1.1. https://CRAN.R-project.org/package=patchwork
  • Wickham et al., (2019). Welcome to the tidyverse. Journal of Open Source Software, 4(43), 1686, https://doi.org/10.21105/joss.01686

References

LS0tDQp0aXRsZTogJyoqVGhlIFBsYWNlIG9mIEludGVyb2NlcHRpb24gYW5kIFRoZW9yeSBvZiBNaW5kIGluIERlY2VwdGlvbioqJw0Kc3VidGl0bGU6IEEgU3VidGl0bGUNCm91dHB1dDoNCiAgaHRtbF9kb2N1bWVudDoNCiAgICB0aGVtZTogY2VydWxlYW4NCiAgICBoaWdobGlnaHQ6IHB5Z21lbnRzDQogICAgdG9jOiB5ZXMNCiAgICB0b2NfZGVwdGg6IDMNCiAgICB0b2NfZmxvYXQ6IH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